Invalid type attribute invalid type() suboption invalid survey() option


I am having an issue described in a previous post, getting the following error:

invalid type attribute 'select_one section_Fiama or_other,section_Fiama,SECTION:,,yes,,${Departureyn} = 1 and ${chiefdom} = 1,"Enumerator Note: Select > the name of the SECTION on the form. Only use the option “Other” if the name is completely different. If it is just a typo, still select the option including the typo. Inform your supervisor about the mistake.",,,,,'
invalid type() suboption
invalid survey() option

The command I am using is just:
odkmeta using "dtafile'", csv("csvfile'") survey("surveyfile'") choices("choicefile'") replace

Thank you for your help!

Hi @szannou!

There are a few other topics that mention an error message that says invalid type() suboption. The most common reason is an encoding issue: odkmeta requires that the survey and choices CSV files contain only ASCII characters, not Unicode. For example, the text Only use the option “Other” if the name is completely different seems to contain curly quotes, which are not ASCII characters. See the discussion here and here for more information about this issue.

Hope this helps!

Hi Mattew,

Thank you very much for your email!

I'm still having the same problem.

Please i'm sending you the csv file and the dofile.

Thank you for your help.

Le mer. 16 oct. 2019 à 03:38, Matthew White via ODK Forum a écrit :

s1.csv (11.8 KB)

ch1.csv (38.3 KB)

Tax form assessment final.csv (1.26 KB)

(Attachment is missing)

Hi @szannou! I'm noticing a couple of issues in s1.csv when I open it in Excel.

The first is that something seems to have gone wrong in the conversion of the survey sheet of the XLSForm to CSV. The good news is that some rows of the sheet seem to have converted correctly. For example, on row 6, the value of the type column is select_one yn, the name column is Departureyn, the label column is Are you about to depart for tax collection for the day?, and so on: each column has its own value. However, on the next row, this is not the case. Only the first column, the type column, has a value. That value is:

note,Departureyn_y,"If yes, please fill out the following information about the Tax Assessment survey",,,,${Departureyn} = 1,,,,,,

In other words, the values of the row are not being distributed across the columns, but rather have been combined in a single cell.

Could you tell us more about how you converted the survey sheet to CSV? What application did you use, and what options did you select? Did you make manual edits to the CSV file? It'd also be helpful if you could attach the original XLSForm.

I also wanted to mention one other issue with s1.csv, which is that I am seeing non-ASCII characters in the CSV file. For example, on row 13, I see the text Only use the option ìOtherî if the name is completely different. It seems like in the conversion to CSV, the curly quotes were replaced with ì and î. To avoid this, I'd recommend that before you convert the survey sheet to CSV, you first replace the curly quotes in the label column with straight quotes (""), or just remove the curly quotes entirely. The links in my previous reply have more information about how odkmeta handles Unicode and about this issue.

Hope this helps!

Hi Mattew,

Thank you very much for your feedback.

I was not able to have the right format with tax form assessment final.csv when i converted the survey sheet to CSV with my excel using save as CSV (comma delimited separator).
I then convert it by online.Tax_form_assessment(5).xml (99.9 KB)

Please find attached the XLSForm.

In what way was the format not correct? Also, Tax form assessment final.csv is your submissions data file, right? Did you have to convert that to CSV?

In general, I'd recommend using Excel rather than an online converter, as I've had successful experiences using Excel for this conversion.

If you replace or remove the curly quotes (and any other non-ASCII characters) in the label column, then use Excel to export the survey and choices sheets as CSV, does odkmeta run successfully? If not, what error message do you end up seeing?