Invalid array length

loading errors for: https://solidaridad-odk-col.org/-/edit/a2UYod6UAVDd4Mol3S2kdH4jniSxPHI?instance_id=uuid:b930eced-ce5d-4f80-b444-3b113618e68f&return_url=https%3A%2F%2Fsolidaridad-odk-col.org%2F%23%2Fprojects%2F38%2Fforms%2Fasombrate_2024%2Fsubmissions%2Fuuid%3Ab930eced-ce5d-4f80-b444-3b113618e68f

1 Like

Looks like the link is expired. Can you please go to Central and try clicking edit for the same Submission.

1 Like

@support@getodk.org The errors of: Invalid array length continue to appear in the central odk cmd, here I can leave you the link of the Loading Error, https://solidaridad-odk-col.org/-/edit/XTNVdi4iaI5VhZ9AfnJydvvz9Nyec9X?instance_id=uuid:acd327e9-d928-436b-9db8-8a565a0351c8&return_url=https%3A%2F%2Fsolidaridad-odk-col.org%2F%23%2Fprojects%2F10%2Fforms%2Fcacao_carbono%2Fsubmissions%2Fuuid%3Aacd327e9-d928-436b-9db8-8a565a0351c8 they are also appearing in other projects it is possible that you can help me by finding the error and I attach the project template.

cacao_carbono.xlsx (341.5 KB)

Hi Daniel, I tried the attached Form and I was able to create a Submission and edit that in Enketo.

Looks like the problem is in some calculation in the Form definition and some submission data is causing that calculation to fail.

To find out the root cause, we would need to see the Submission data, would you be able to share submission XML here or in DM? You can view the Submission XML at https://solidaridad-odk-col.org/v1/projects/10/forms/cacao_carbono/submissions/uuid:acd327e9-d928-436b-9db8-8a565a0351c8.xml

Hello, the link to one of the shipments is this:https://solidaridad-odk-col.org/-/edit/XTNVdi4iaI5VhZ9AfnJydvvz9Nyec9X?instance_id=uuid:eb544819-2f16-4238-88f5-78cf6091a74f&return_url=https%3A%2F%2Fsolidaridad-odk-col.org%2F%23%2Fprojects%2F10%2Fforms%2Fcacao_carbono%2Fsubmissions%2Fuuid%3Aeb544819-2f16-4238-88f5-78cf6091a74f

I also share with you a link that does work correctly,https://solidaridad-odk-col.org/-/edit/XTNVdi4iaI5VhZ9AfnJydvvz9Nyec9X?instance_id=uuid:f1d5df12-5457-4157-bba3-df28d43165bf&return_url=https%3A%2F%2Fsolidaridad-odk-col.org%2F%23%2Fprojects%2F10%2Fforms%2Fcacao_carbono%2Fsubmissions%2Fuuid%3Af1d5df12-5457-4157-bba3-df28d43165bf

Hi, Sadiq_Khoja, Have you checked the link I sent you to see the error?

The link you have shared is not accessible. Please go to this link https://solidaridad-odk-col.org/v1/projects/10/forms/cacao_carbono/submissions/uuid:acd327e9-d928-436b-9db8-8a565a0351c8.xml and share the XML you see there.

2024-07-09T10:39:27.357-05:00 2024-07-10T08:34:45.088-05:00 si tecnico43 María Lucid Callé Rodríguez Femenino Cedula_de_ciudadania 32117591 1720539721671.jpg 1720539726534.jpg 32117_ta_ma_09/072024 El bosque antioquia 5790 La cabaña La caucana 2024-07-10 1958-10-15 No ninguno Escuela_Primaria 3104878584 no no 1 0 0 0 0 0 1 no si documento_carta_venta Spanish whatssap mensaje_texto otro_prediomismo_municipio luz yes 28 mula entre_1_y_2 56 20 no no 20 no 11.569482 4.430158 0 no automatico 800 2024-01-01 80 CCN_51 ICS_39 ICS_95 Híbrido 4200 840 300 no 1 1 1 0 6 1 1 semanal yes presencial c4d yes Fairtrade yes asíciacion asociacion acata yes yes marquesina yes no 2 2 triangulo 4m_4m 3_5_m_3_5_m 3.685888 Agrisilviculture cacao 2011-05-01 3500 700 no triangulo 4m_4m 3m_3m 0.74427 Agrisilviculture cacao 2012-07-01 700 100 no poligono 7.6050541 -75.5545177 461.2 4.155; 7.6051962 -75.5541943 474.79999999999995 3.812; 7.6054705 -75.5541399 481.4 3.689; 7.6056139 -75.5541846 486.09999999999997 3.776; 7.6057431 -75.5546168 475.2 3.222; 7.6060135 -75.5544782 483.09999999999997 3.177; 7.6062887 -75.5542725 495.29999999999995 3.442; 7.6063364 -75.5545023 491.59999999999997 3.46; 7.6064956 -75.5547188 487.0 4.031; 7.6066104 -75.5548884 479.0 3.238; 7.6068151 -75.5550398 468.4 3.439; 7.6070778 -75.5550029 468.7 3.085; 7.6074009 -75.55498 476.5 3.621; 7.6077208 -75.5548865 479.79999999999995 3.51; 7.6077265 -75.5551902 485.09999999999997 3.428; 7.6077429 -75.5553274 488.59999999999997 3.481; 7.6075026 -75.5552319 485.09999999999997 3.254; 7.6071072 -75.5553074 482.9 3.372; 7.6068522 -75.5556065 479.5 3.607; 7.606804 -75.5557123 473.09999999999997 2.944; 7.6065136 -75.5559083 470.2 3.549; 7.6056493 -75.5560225 449.9 3.761; 7.6053065 -75.5559216 436.2 3.681; 7.6052558 -75.5560729 434.29999999999995 3.741; 7.60516 -75.5560811 432.5 3.736; 7.6050611 -75.5560087 429.79999999999995 3.552; 7.6050121 -75.5559318 428.0 3.745; 7.6050085 -75.5554466 446.4 4.478; 7.6049426 -75.5552314 446.2 3.542; 7.6050169 -75.5550177 452.7 3.657; 7.6050541 -75.5545177 461.2 4.155 41 41 0 7.6050541 7.6050541 -75.5545177 [-75.5545177,7.6050541], 1 4.155; 7.6051962 [7.6051962,], 2 474.79999999999995 3.812; [3.812;,], 3 -75.5541399 481.4 [481.4,], 4 7.6056139 -75.5541846 [-75.5541846,], 5 3.776; 7.6057431 [7.6057431,], 6 475.2 3.222; [3.222;,], 7 -75.5544782 483.09999999999997 [483.09999999999997,], 8 7.6062887 -75.5542725 [-75.5542725,], 9 3.442; 7.6063364 [7.6063364,], 10 491.59999999999997 3.46; [3.46;,], 11 -75.5547188 487.0 [487.0,], 12 7.6066104 -75.5548884 [-75.5548884,], 13 3.238; 7.6068151 [7.6068151,], 14 468.4 3.439; [3.439;,], 15 -75.5550029 468.7 [468.7,], 16 7.6074009 -75.55498 [-75.55498,], 17 3.621; 7.6077208 [7.6077208,], 18 479.79999999999995 3.51; [3.51;,], 19 -75.5551902 485.09999999999997 [485.09999999999997,], 20 7.6077429 -75.5553274 [-75.5553274,], 21 3.481; 7.6075026 [7.6075026,], 22 485.09999999999997 3.254; [3.254;,], 23 -75.5553074 482.9 [482.9,], 24 7.6068522 -75.5556065 [-75.5556065,], 25 3.607; 7.606804 [7.606804,], 26 473.09999999999997 2.944; [2.944;,], 27 -75.5559083 470.2 [470.2,], 28 7.6056493 -75.5560225 [-75.5560225,], 29 3.761; 7.6053065 [7.6053065,], 30 436.2 3.681; [3.681;,], 31 -75.5560729 434.29999999999995 [434.29999999999995,], 32 7.60516 -75.5560811 [-75.5560811,], 33 3.736; 7.6050611 [7.6050611,], 34 429.79999999999995 3.552; [3.552;,], 35 -75.5559318 428.0 [428.0,], 36 7.6050085 -75.5554466 [-75.5554466,], 37 4.478; 7.6049426 [7.6049426,], 38 446.2 3.542; [3.542;,], 39 -75.5550177 452.7 [452.7,], 40 7.6050541 -75.5545177 [-75.5545177,], 36858.88422990873 3.685888 [-75.5545177,7.6050541], [7.6051962,], [3.812;,], [481.4,], [-75.5541846,], [7.6057431,], [3.222;,], [483.09999999999997,], [-75.5542725,], [7.6063364,], [3.46;,], [487.0,], [-75.5548884,], [7.6068151,], [3.439;,], [468.7,], [-75.55498,], [7.6077208,], [3.51;,], [485.09999999999997,], [-75.5553274,], [7.6075026,], [3.254;,], [482.9,], [-75.5556065,], [7.606804,], [2.944;,], [470.2,], [-75.5560225,], [7.6053065,], [3.681;,], [434.29999999999995,], [-75.5560811,], [7.6050611,], [3.552;,], [428.0,], [-75.5554466,], [7.6049426,], [3.542;,], [452.7,], [-75.5545177,], 568 {"type":"Polygon","coordinates":[[[-75.5545177,7.6050541], [7.6051962,], [3.812;,], [481.4,], [-75.5541846,], [7.6057431,], [3.222;,], [483.09999999999997,], [-75.5542725,], [7.6063364,], [3.46;,], [487.0,], [-75.5548884,], [7.6068151,], [3.439;,], [468.7,], [-75.55498,], [7.6077208,], [3.51;,], [485.09999999999997,], [-75.5553274,], [7.6075026,], [3.254;,], [482.9,], [-75.5556065,], [7.606804,], [2.944;,], [470.2,], [-75.5560225,], [7.6053065,], [3.681;,], [434.29999999999995,], [-75.5560811,], [7.6050611,], [3.552;,], [428.0,], [-75.5554466,], [7.6049426,], [3.542;,], [452.7,], [-75.5545177,]]]} yes 7.6034545 -75.5547057 449.09999999999997 3.284; 7.6033129 -75.5548131 447.59999999999997 3.815; 7.6031875 -75.5549336 449.4 3.872; 7.6031221 -75.554735 450.7 3.245; 7.6031262 -75.5545095 461.59999999999997 3.07; 7.6030508 -75.5541422 478.59999999999997 4.21; 7.6031955 -75.553953 479.7 3.605; 7.6032477 -75.5539262 480.59999999999997 3.296; 7.6032446 -75.5538785 488.9 3.486; 7.6034585 -75.5538321 492.5 3.333; 7.6037838 -75.5538329 490.09999999999997 3.266; 7.603964 -75.5539734 485.5 3.714; 7.6039575 -75.5542673 472.79999999999995 3.685; 7.6039084 -75.5544392 470.7 3.481; 7.6036322 -75.5543233 459.7 3.398; 7.6035719 -75.5544373 460.0 3.378; 7.6034545 -75.5547057 449.09999999999997 3.284 22.333333333333332 22.333333333333332 0 7.6034545 7.6034545 -75.5547057 [-75.5547057,7.6034545], 1 3.284; 7.6033129 [7.6033129,], 2 447.59999999999997 3.815; [3.815;,], 3 -75.5549336 449.4 [449.4,], 4 7.6031221 -75.554735 [-75.554735,], 5 3.245; 7.6031262 [7.6031262,], 6 461.59999999999997 3.07; [3.07;,], 7 -75.5541422 478.59999999999997 [478.59999999999997,], 8 7.6031955 -75.553953 [-75.553953,], 9 3.605; 7.6032477 [7.6032477,], 10 480.59999999999997 3.296; [3.296;,], 11 -75.5538785 488.9 [488.9,], 12 7.6034585 -75.5538321 [-75.5538321,], 13 3.333; 7.6037838 [7.6037838,], 14 490.09999999999997 3.266; [3.266;,], 15 -75.5539734 485.5 [485.5,], 16 7.6039575 -75.5542673 [-75.5542673,], 17 3.685; 7.6039084 [7.6039084,], 18 470.7 3.481; [3.481;,], 19 -75.5543233 459.7 [459.7,], 20 7.6035719 -75.5544373 [-75.5544373,], 21 3.378; 7.6034545 [7.6034545,], 7442.698887551056 0.74427 [-75.5547057,7.6034545], [7.6033129,], [3.815;,], [449.4,], [-75.554735,], [7.6031262,], [3.07;,], [478.59999999999997,], [-75.553953,], [7.6032477,], [3.296;,], [488.9,], [-75.5538321,], [7.6037838,], [3.266;,], [485.5,], [-75.5542673,], [7.6039084,], [3.481;,], [459.7,], [-75.5544373,], [7.6034545,], 303 {"type":"Polygon","coordinates":[[[-75.5547057,7.6034545], [7.6033129,], [3.815;,], [449.4,], [-75.554735,], [7.6031262,], [3.07;,], [478.59999999999997,], [-75.553953,], [7.6032477,], [3.296;,], [488.9,], [-75.5538321,], [7.6037838,], [3.266;,], [485.5,], [-75.5542673,], [7.6039084,], [3.481;,], [459.7,], [-75.5544373,], [7.6034545,]]]} no La productora es una viuda ella no tiene la capacidad de poder hacer personalmente las labores al cultivo pero eso no le impide tener su cacao al día ya que ella contrata 1 trabajador para que le administre el cacao y con la producción le paga al trabajador. 1720550400109.jpg 1720550292968.jpg 32117591-MariaCalle-09/07/2024 uuid:acd327e9-d928-436b-9db8-8a565a0351c8 cacao_carbono: 32117591-MariaCalle-09/07/2024

Looks like your browser has formatted the XML by removing its tag. XML usually looks like this:

There should be an option to "save page" in your browser. In Chrome you can click on â‹® (top-right) > Save and Share > Save Page as. Or by pressing Ctrl + S (windows) or Cmd + S (mac).

Please go to the same link and try saving the page, then share the file here.

uuid_acd327e9-d928-436b-9db8-8a565a0351c8.xml (20.5 KB)

Thanks for sharing the XML.

Issue:

It turns out that the issue is with the repeat_count column in the Form definition. The rule is that the value of repeat_count has to be an integer, even when we are using an expression/calculation it should result in a whole number, however in the Form definition, there are few calculate questions that result in decimal numbers and then those are used as repeat count. For e.g. Repeat geopointss has repeat_count from ${numpointss} and the value of numpointss can be decimal because the calculation divides geoshapes by 3, in the submission.xml that you shared its value is 22.3333.

Solution:

We can use round or number function to convert decimal number into an integer. For every repeat, where its count comes from a calculation, we can add round function either in repeat_count column or in the original calculation. See the attached Form definition where I have added round function in all repeats that derives its count from a calculate question.

cacao_carbono (1).xlsx (341.3 KB)

1 Like

Thank you very much, for the help I will publish the form and I will carry out the field tests and I will inform you.