Hi,
I have created an xls form that I want to convert for testing. However, I keep getting this error Error: b'ODK Validate Errors:\n>> Something broke the parser. See above for a hint.\nDependency cycles amongst the xpath expressions in relevant/calculate\n\nResult: Invalid'
I am using version 1.2.0.
Anyone who might know how I can resolve this problem kindly help. It is driving me crazy.
Hi Dr. Gareth.
Thank you for getting back to me.
I have managed to identify where the above mentioned problem. However, another problem cropped up.
When adding up the totals for hh incomes, hh expenditures and total incomes from other sources.
I will post the form definition so that you can have a look at it.
Please share what you identified the problem to be, and how you fixed it, so that perhaps others landing here in the future can determine if they hit the same problem.
If there is now something else wrong in your form, please start a new thread. BTW, a common mistake when making summation calculations - eg your "adding up the totals" - is not handling potentially null/empty operands; see here
Your ${totalhhpurchaseann} is a long summation of many other values. If any single one of these is not answered (ie null), then the entire sum will become invalid (NaN)! Unless every operand in your sum is mandatory, you have to explicitly add logic to your calculations to treat empty/null values as 0. Again, please refer to my previous link for details.
Hi, Xiphware,
The problem I found was I was adding a "relevant" function in the single select question select_one yn. That was what was breaking the logic path in the form.
I am working on amending the sum function as you have advised in your previous forum post. I will post here how it goes. Thank you for your help. Much appreciated.
Error: b'ODK Validate Errors:\n>> Something broke the parser. See above for a hint.\nDependency cycles amongst the xpath expressions in relevant/calculate\n\nResult: Invalid'
Error: b'ODK Validate Errors:\n>> Something broke the parser. See above for a hint.\nDependency cycles amongst the xpath expressions in relevant/calculate\n\nThe following files failed validation:\n${smart_gb4}.xml\n\nResult: Invalid'
Hi @ocristo
the problem is in relevant column in lines 81 and 83
you can't use an answer from the current question in relevant ${anje05amamnome} = 2 because it doesn't exist yet.
What do you try to achieve? It's in repeat group so probably you want an answer from a previous repat group?