Select_one_from_file on Central v2025.2.2-3 preventing Collect/WebForms from Opening Form

1. What is the issue? Please be detailed.

I'm cooking up an epic script for automating a sync between Google Drive w Central. I’ve successfully been able to do this for all media (images and audio) but I’m getting caught up on an external CSV that is “crashing” Collect showing this error in an alert dialogue.

<label> node for itemset doesn't exist! [instance (tasks)/root/item/label]

I’m trying to use ODK Central API to update an external dataset, but I’ve also tried it manually on the Web Interface of Central as well with same result. My XLSForm has a survey question:

select_one_from_file tasks.csv

Here is that .csv file.

tasks.csv (6.0 KB)

2. What steps can we take to reproduce this issue?

Make a XLSForm w a question like select_one_from_file tasks.csv and upload the XLSX to Central, upload the tasks.csv as an attachment. Open the form up on ODK Collect and you get an error when you open the form that prevents you from starting seen in the screenshot below.

3. What have you tried to fix the issue?

I used the API to list all form attachments and this is what I get for tasks.csv

{"name":"tasks.csv","type":"file","hash":"8bafd538af1f8e1a5cafbd9afbaca21c","exists":true,"blobExists":true,"datasetExists":false,"updatedAt":"2025-08-21T16:56:58.245Z"},

This is what it said after using my API to upload a new form definition and update tasks.csv, I also did this manually using the web interface and it still has

"datasetExists":false

I’m pretty sure this is what needs to get flipped to true but not sure why that isn’t happening. Perhaps there is something wrong with the CSV???

I also tried changing the field in the XLSForm to select_one_from_file tasks

but I got this error when trying to upload the XLSForm to Central via API

Failed to update XLSForm draft: Upload failed: {"message":"The given XLSForm file was not valid. Please see the error details for more information.","code":400.15,"details":{"error":"[row : 81] File name for 'select_one_from_file tasks' should end with one of the supported file extensions: '.xml', '.csv', '.geojson'","warnings":null}}

4. Upload any forms or screenshots you can share publicly below.

So I don’t think this has anything to do with my script and maybe this is an ODK Central Bug as I just tried this again using the Central Web Interface by uploading an XLSX file form definition as a new draft for a form that already exists on Central, but I changed

select_one_from_file tasks.csv to select_one_from_file z_test1.csv

I uploaded z_test1.csv on the Central Web Interface (v2025.2.2-3-g46dc1b5) and published the draft. I’m getting the same error on ODK Collect 2025.3.0 Beta 3 with the file name changed

<label> node for itemset doesn't exist! [instance (z_test1)/root/item/label]

I’ve found that the rabbit hole goes deeper. The form is loading and displaying text choices from the csv on Enketo:

Form Fails to load on WebForms with the error: Function ‘jr:choice-name’ is not defined.

Can anyone else add a form with a select_one_from_file example.csv question on the most recent version of Centralv2025.2.2-3-g46dc1b5 and have it show up properly in Collect/Webforms?

So I found this: https://github.com/getodk/javarosa/issues/665 which implies that my CSV headers have a blank space, but I’m not finding any blank spaces. Maybe its something else with the headers?

I tried again with z_test3.csv (6.1 KB) and its still not working. I triple checked…am I going crazy? I copied my headers from my CSV file opened in VSCode, pasted into a single excel cell, and then checked for empty spaces by using this formula: =LEN(C3) - LEN(SUBSTITUTE(C3, " ", "")) and there are no spaces in my headers.

I also tried:

  1. Removed the ç characters
  2. Verified that every column has a header and at least one row with data

name,label::English(en),label::Français(fr),label::Konyanka(mku),image::English(en),image::Français(fr),image::Konyanka(mku),audio::English(en),audio::Français(fr),audio::Konyanka(mku),username,places1,places2,places3,quarter,order,priority,date_due,deadline

Still stuck and it’s looking like ODK Collect doesn’t like the CSV…

@rfvieira , last time you helped find my CSV troubles… Any ideas here?

select_one_from_file doesn’t support multi-language labels currently. We’ve discussed some specification ideas but have not had a chance to go further with it.

I believe your CSV would work with the search() function in the appearance column (https://xlsform.org/en/#dynamic-selects-from-pre-loaded-data). I’m not sure whether multilanguage images are supported and I don’t believe audio is supported.

Ok that explains it… does select_one_external support multilingual audio and images just like the normal choices sheet of the XLS form?

Based on this, it looks like media is not fully supported via an external CSV even monolingually, only with the workaround that involves populating the internal choice list (choices) tab of the XLSForm.

1 Like

Hi @Tyler_Depke and @LN !

Sorry for this late response :frowning:

I was wondering if you could make changes to the header of your CSV to something like label_en instead of label::English() and then use the search() function that LN mentioned to pick the right text to be displayed.

Xing has shown in the multilingual forms documentation a way to get the current language selected by the enumerator here.

Does that seems like a alternate solution for your problem? Is it feasible?

Cheers!

I fundamentally had to go a different route, the route of putting my data in the choices tab of my XLSForm rather than a separate CSV. I don’t have a large dataset, but I originally wanted to do this to avoid uploading and publishing a large number of XLSForm Versions via an automated process.

Below is a link explaining what I’m doing and one of the other reasons I went the route of using the XLSForm rather than an external CSV is that I have to update media on a regular basis. I’m doing that via a script into Google drive, then the process below syncs those media files/choices sheet changes from the XLSForm to ODK Central.

1 Like