1. What is the issue? Please be detailed.
I’m creating a form from scratch and trying to upload to ODK Central. Upon upload of my XLSX both using the web interface and using the API to connect to a google sheet, I’m getting the following error during form validation:
Error: API failure (400): {"message":"The given XLSForm file was not valid. Please see the error details for more information.","code":400.15,"details":{"error":"'NoneType' object is not iterable","warnings":null}}
I’m not sure where to look for errors. Has anyone gotten this error before?
2. What steps can we take to reproduce this issue?
See the attached Google Sheet or XLSX file and try to upload it to a project in ODK Central.
Avocado_IPGRI_bad.xlsx|attachment (92.5 KB)
Here is a more minimal google sheet with many of the columns deleted and still the same error:
3. What have you tried to fix the issue?
Since I have a bunch of empty columns, I tried deleting all columns except the first 3 in both the choices and survey sheet, but that gave me an error that my calculations were null. Upon deleting all the calculate rows, I end up getting the same error again. I’m thinking there is a row that doesn’t have a value in it that needs one, but I cannot find it. I’ve never seen this error message before and it isn’t specific enough to help me find where the problem(s) is/are.
4. Upload any forms or screenshots you can share publicly below.
Minimal w deleted columns below:
I looked at your form and the group structure seemed unusual, but there was the correct number of begin/ends so was possibly ok, so I tried
- removing emoji from filename
- removing emoji from form_id
- removing choice item r_19 which had no list name or label
- renaming choice sheet column
list name to list_name
- adding
form_title to settings
- asking kapa
- realised that I should go back to basics and simply googled the error and... tada
- "The cause of the error was an ‘empty’ group. There was no survey element in a ‘begin_group/end_group’ section."
- added a note inside
g_4 
-
begin group g_4 Multiplication/Regeneration descriptors
note g_4_1 now it uploads!
end group
- The original minimal version also uploads with this one weird trick, skipping all the first attempts
1 Like
Looks like that did it! I’ve been surprised how few errors I’ve encountered as I continue to use emojis. I’ve been defaulting to ChatGPT for errors like this for a number of reasons, one of which is bandwidth/internet quality as ChatGPT actually does fairly well compared to search engines when internet isn’t great. Looks like that was a bad decision here.
For the ODK team, I don’t know how general this particular error message is, but 90% of the errors I encounter have a row number or a variable name so it’s easy to find where the issues are. If it’s not too difficult to modify this error message to include variable name that would be super helpful.
Sorry for the confusion! This issue is on the list here: https://github.com/XLSForm/pyxform/issues/754 It can be triggered by empty groups or groups containing no visible items. It’s unclear why this is a problem exactly but at least the error message can be more helpful than it is right now.
2 Likes