The last two projects I’ve uploaded give me the error “argument of type ‘bool’ is not iterable” when I try to preview them. I checked and can’t see what’s wrong.
They deploy normally and look OK but I’m worried there may be some problem with using the forms to collect data.
Any idea what’s going on / whether this is a serious error / how to fix this error?
I get that too, when uploading from xls - however the workaround I use is:
After uploading the xls I then go into form builder, hit edit, change one question (e.g. add a space) then save and change the question back to what it was before and save.
After that I can preview the form just fine, even though the form itself (structure and content/labels) is exactly the same as what I had uploaded via xls.
Would love to know what the reason for this preview error is - I’ve seen it when previewing other peoples’ forms as well so I don’t think it’s just me doing something wrong!
Could you post your XLSForm here for us to take a look. This error message may be coming from pyxform as it is trying to parse your form into XML (as opposed to Enketo)
hi, I think I’ve got to the bottom of it. I’ve attached the simplest possible form where I get the bool not iterable error on preview - it’s to do with the “select_one xxx or_other” question.
If I just have “select_one xxx” then I can preview fine. Once I add the “or_other” then I get the error on first preview (but the workaround of going into edit mode then saving even if no changes are made allows me to then preview with no error). The xls download before editing and after editing look the same to me though.
Note that my project has remained in draft the whole time - but I’ve seen the bool error in preview even on deployed projects.
One interesting thing I noticed that may provide a clue, is the XML. I tried downloading the XML before and got a 0 byte file. But once I’d saved my non-change in Form Builder I downloaded the XML again and this time it downloaded properly.