Problem recognizing external choices command with today's system upgrade

Hi. I’m uploading a project but i’m not able to deploy it due to this error:

[row : 6]List name not in external choices sheet: Mapa

I’m 100% positive there’s no problem with my code since I use exactly the same code every single day and until yesterday it’s been working just fine. It looks to me like some upgrade has been done to the system in the past few hours and this error appeard as a consequence.

Could someone form the Kobo support team take a look please? @Kal_Lam
Thanks a lot!

@basualdo, could you share with us your xlsform and also let us know the server you are using? Maybe that would help us with testing the same at our end.

Hi @Kal_Lam

Thanks a lot for replying so fast. Absolutely, I always upload my form using the new (not legacy) kobocollect platform at https://kf.kobotoolbox.org/#/forms

I’m also attaching my xlsform. The basic problem is that the system expects to read my external data file at the implementation step which obviously is impossible because at that point the external data file hasn’t been uploaded.

Thanks a lot!

LuisGenommaDetalle-1junio.xlsx (218.8 KB)

@basualdo, is it the pull data function that is not working at your end? Or could you be more specific on what is not working? Maybe a screenshot of the section would help us here.

The problem shows when using “select_one_ external”. For some reason the system expects to read the content of the external data file BEFORE it’s been uploaded. This is why as soon as I try to implement the project I get the following error msg:

I modified the code so that it doesn’t use select_one_external. Instead I used select_one and added the choices in the Choices tab of the xlsform. As expected, I could deploy the project with no issues. So yeah, it is basically the select_one_external command that is not working properly.

I would suggest you create a simple form asking to select_one_external and nothing else (I’m in fact attaching to this msg such example) and you will be able to replicate the error.

Please let me know if I’m still not explaining the issue clearly and I’ll be happy to try something else.

Regards,

LuisSelectOneExternal error.xlsx (185.0 KB)

OK, could you then share with me the external files associated with following questions (so that I could have a look at my end):

Sure thing.

itemsets.csv (2.7 MB)

1 Like

@basualdo, will get back to you after testing. Besides, did you mean you were able to use this before the upgrade? Correct me if I have wrongly understood you.

I’ve been using select_one_external every single day for months with no issues until now. That’s why I attribute the problem possibly to some sort of upgrade made in the past 20hrs or so.

1 Like

Hi @Kal_Lam

Last year there was some sort of upgrade in the system and that prevented many users to deploy our projects.

Well, I’m afraid history is repeating itself today because I cannot deploy my projects. I get the following error instead:

[row : 6]List name not in external choices sheet: Mapa

I’m pretty sure is not a code problem because I’m using exactly the same code I use every single day. This is a problem caused by today’s upgrade.

Could you please report this to whoever can fix it? I’m sure similar reports are coming in the next few hours.

Thanks a lot!

Luis

xref to upgrade notice: Release Notes - version 2.021.21

1 Like

@basualdo, kindly please be informed that I just checked the feature with the HHI server and it works. Please be informed that this feature at the moment only works with Collect android app while Enketo does not support it. You could design your xlsform as outlined in the image shared below:

In the survey tab of your xlsform:

Image 1

In the choices tab of your xlsform:

Image 2

In the external_choices of your xlsform:

Image 3

Or, you could simply list out the unique list_name as shown in the image below:

Image 3_1

In your CSV file:

Image 4

Reference xlsform:

select_one_external.xlsx (12.8 KB)

Reference CSV file:

itemsets.csv (348 Bytes)

1 Like

@Kal_Lam My conclusion is that from this update on, it is mandatory to add to the xlsform file a tab named “external_choices” with only the first column of the csv file (the one named list_name).

As soon as I did this, the system allowed me to deploy my projects.

As always, thanks a lot for your help!

Luis

2 Likes

Hi @basualdo, can you please try with the new select_one_from_file and reference your external file that way? The enforcement of the “external_choices” sheet is due to the pyxform upgrade and took place in v0.15.0 as seen here in the change log and here in the code.

1 Like

Hi @Josh . I just tried select_one_from_file. It worked just fine but I realized I had to split my itemsets.csv file into several independent files (one for each of the list_names).

I wonder: which way is best? Would you recommend:

  1. Using select_one_external along with a external_choices tab and a single itemsets.csv file? or

  2. Using select_one_from_file with no external_choices tab and one itemsets.csv file for each list?

Thanks!

Hi @basualdo that all depends on what’s best for your workflow :+1:

1 Like

Hello @Josh. Today I deployed a form to my users using the select_one_from_file command and it was a total disaster because many of them found the form to be behaving extremely slow. I had to immedatiely go back to the select_one_external solution.

Hope someone can find this useful.

Thanks!

1 Like

Hi @basualdo, thank you for the feedback. I see there is a note in the xlsform docs regarding this:

However, if your external data file consists of many thousands of lines, please test carefully whether the performance is satisfactory on the lowest spec device you intend to use. If it is too slow, consider using External Selects or Dynamic selects from preloaded data if your data collection application supports it.

Please note that this is unrelated to Kobo.

3 Likes

Ok @Josh . No surprises here then. Thanks anyway for suggesting this (for me) new command.

2 Likes