The reply above wasn't an answer to the initial question, just the dataset. I'm wondering if there is an answer for what the issue is when you get this error...
It looks like @plaga is getting the same error so I've joined the topics.
I haven't seen this specific error before. My guess would be that a special character that is being interpreted as binary made its way into the form. A strategy similar to the one at Conversion Error (ascii codec can't decode...) may be needed to find where and fix it.
It would really help to have a form to refer to but unfortunately the form link seems to have expired. @wkgray you should be able to upload now or perhaps one of @amarr or @plaga can.
I think this was an temporary error with the conversion software rather than my form as I did not get it again and it has not been an issue. It is possible that it was due to a space in one of the variable names, and this seems the most obvious explanation if it was not just a temporary issue with the conversion.
The python interpreter at open data kit webchecker checks the compliance of the xls form to certain rules, and one of the rare but annoying error is" Can't convert 'byte' object to str implicitly, usually occurs when you have a space or illegal character under the 'name' column in xls form. To find out the offending character you can divide the excel sheets using divide and conquer kind of algorithm, test smaller part say one half of the form and the other half separately, continue testing the error on untested half of the excel till you get the problem.
I've had this problem and have been doing some heuristics (um, trial and error) to find the cause. I searched my xlsx Name columns for 'special characters' and spaces, but found none.
However, I did discover that if the name column in the survey sheet has a number in it, the error comes up. Is this expected behaviour? It's unfortunate, because I had used the questions as the Name (my survey is being run in parallel online), but they were too long so thought using the question numbers would be easy...
My workaround is to spell the numbers!
I found the following values in the Name column:
1 - failed
1a - failed
one - succeeded
one_a - succeeded
If I use numbers in the name column on the Choices sheet the xlsform converts no problem.
Not exactly intuitive but on a long survey it's not always easy to find 'shorthand' names for each question. It would be good if numbers could be used...
One thing we tend to do in surveys is systematically use q# (q100, q2207) as variable names for questions that the enumerators see. Then we always know if something is a q# variable it is coming from the original question asked. Anything we calculate (say, for checks) we give a different name, like z#. This is also handy for when you are analyzing the resulting dataset in a statistical program (STATA person here), because you can always tell a created variable from an original variable; original variables are the q# while the created ones we name things like "age."
This doesn't solve the underlying problem of numbers failing, but might be a helpful way to systematically number!
@seewhy pyxform, the library that converts XLSForms to XForms, uses the name column to generate an XML node and per the XML spec, XML nodes can't start with numbers.
The latest versions of the XLSForm converters should give you this error if you have a name that starts with a a number: pyxform.errors.PyXFormError: [row : 2] Invalid question name [1] Names must begin with a letter, colon, or underscore. Subsequent characters can include numbers, dashes, and periods.
What tool and version are you using to do the conversion?
Hi @elmps2018 and @yanokwa,
Thanks for your responses - between them there is a solution that works and matches those criteria for pyxform.
I did check the documentation (http://xlsform.org/) but it didn't leap out at me that the name can't start with a number (or be a number). Maybe I was looking in the wrong place.
Now I know, it is easy to avoid, and still have a logical naming convention, such as that suggested by @elmps2018
I'm using the online converter (the one that I'm having trouble with in Firefox!) but it doesn't give me the explicit error you have posted. Which is why I posted my question in this thread.
Thanks very much to both of you for your help - appreciated.
Thanks for all the great troubleshooting on this thread! I've just confirmed that there's a bug in the current version of XLSForm online available at http://opendatakit.org/xiframe/. It should show the error that @yanokwa mentioned above (pyxform.errors.PyXFormError: [row : 2] Invalid question name [1] Names must begin with a letter, colon, or underscore. Subsequent characters can include numbers, dashes, and periods.). I have filed the issue at https://github.com/opendatakit/xlsform-online/issues/5.
any label within name column should not started with a number digit... this one of the reason for "Error: Can't convert 'bytes' object to str implicitly" this error massage....