URGENT : I am not able to deploy my questionnaire (SERVER ERROR 500)

I am not able to upload my xls file(being a new user)
I’ll paste the error I am facing
Error: ODK Validate Errors:

XForm is invalid.
: Cycle detected in form’s relevant and calculation logic!
The following nodes are likely involved in the loop:
${q19}
${total_score}

The following files failed validation:
${SDQ_SelfReported_Updated_NoErrors}.xml

Result: Invalid
please help !

Welcome to the community, @nikhiladhav! You should now be able to upload your XLSForm in the community! But at the same time please also feel free to check the calculation part of ${q19} and ${total_score}. The issue should be there.

Goggins.xlsx (11.9 KB)
I have checked thoroughly and found no errors . Please help me

You appear to have some fundamental issues in your form that will need fixing.

All your select_one questions - q1…q25 - have an associated calculation, which depends on itself (!) [I dont know why the error presented to you only picked up q19…]. So these will in fact all inherently cause a cycle!

My deduction is that you put these calculations in to basically re-map the selected option to a number - 0/1/2 - in order to then sum them up. But you can actually accomplish this directly by just using a number as the name value for each option (!). So instead of

just put whatever integer value it is that you want each option to have; eg

1 Like

Goggins.xlsx (11.9 KB)
I have implemented the changes , is there any other change I should make ? Because I am getting the same error again …please help, I am new to this and very perplexed

every option here as different weightage and it varies with each question

Then you will either need a separate calculation row field for each question, or I would probably just suggest using a different choice list for those with differing weights; same labels, but different weights for each option as appropriate for that question (but you can reuse these choice lists across other questions that use the same weighting).

Basically, you cannot have a calculation against each select_one and try and do this in a single row; that will cause a cycle with itself.

Thanks , I have made the changes ,you suggested . I am attaching the file, you can overview . But ,again got a new error. Help me solve this .
Updated_Goggins_Final.xlsx (11.9 KB)
Error: ODK Validate Errors:

Something broke the parser.
Error evaluating field ‘total_difficulties’ (${total_difficulties}[1]): The problem was located in Calculate expression for ${total_difficulties}
XPath evaluation: type mismatch
not a nodeset
Caused by: org.javarosa.xpath.XPathTypeMismatchException: The problem was located in Calculate expression for ${total_difficulties}
XPath evaluation: type mismatch
not a nodeset
… 10 more

The following files failed validation:
${Updated_Goggins_Final}.xml

Result: Invalid