KoBoCollect is not able to get forms with media

@Kal_Lam @Josh

I have a little crisis here with this week’s update: I need to attach external files to my project. These are .csv files with external data that needs to be consulted by my form.

I seem to be having no problem attaching the external files:

The problem comes when I download the form from the KoboCollect android app to fill in forms. I can see how the project itself gets downloaded but the external files are not dowloaded along with the form. Please note that the download shows a “Success” status but I can tell that the external files were not downloaded just by the time it takes to download.

As expected, when I use the form it shows an error message telling me that .csv file “is missing”.

Do you guys know how to avoid this message?

Thanks,

Luis

1 Like

@basualdo, is this a completely new project, or is this a project that you have been working with which was previously in your user account?

@Kal_Lam The problem shows ONLY with completely new projects The projects that I uploaded on jun 14 and before have no issues with this.

@basualdo, could you share your xlsform and the CSV files so that we could have a closer look at it?

Sure @Kal_Lam Preformatted text

CatalogoClientes.csv (5.1 MB) GenommaDetalle-16junio.xlsx (469.9 KB) itemsets.csv (2.7 MB)

OK, seems like you are trying to use the select_one_external. Would you mind having a look at our workaround discussed previously? It should help you design a project with select_one_external question type.

@Kal_Lam I don’t get it… the select_one_external command problem was addressed a few days ago and after following all the guidelines provided by @Josh and yourself it worked like a charm.

The problem today is different. My code hasn’t changed at all and the error msg that used to show a few days ago is still not showing. The problem today is different: the KoboCollect android app is simply not downloading the files attached to the project.

In your testing with my files were you able to download in the android app both the project and its attachments?

Thanks a lot!

Luis

@basualdo, would you mind checking out the files that you shared here (especially the xlsform) and then compare them with the post I shared?

@Kal_Lam I’m so sorry. I just checked the files as you recommended and the only thing I could find is that in the external_choices sheet I had duplicates in the list_name column. I eliminated the duplicates but the problem persists: my .csv file is reported as missing in the Collect app.

I honestly cannot see what else is missing in my files. I feel like I’m failing a test here.

Would you please point me in the right direction here for me to fix the problem? I can sense you think I have problem with my code but I’ve reviewed it many many times and cannot find a problem.

Thanks a lot for your patience Kal!

Luis

@Kal_Lam I’ve created a minimalist xls form with only one line. The form simply prints a note and shares a .jpg.

I deployed and attached the .jpg succesfully. However, when I donwload the form in Collect, the same problem repeats itself: the form downloads successfully but the media file (the .jpg in this case) is not being downloaded. Thus the .jpg is not displayed in the form when filling it in.

My conclusion is that this has nothing to do with the select_one_external command itself.

I’m attaching both the xlsform and the .jpg file.

Thanks,DownloadfileTEST.xlsx (185.2 KB)

Hi @basualdo, we’re looking into this now — hopefully it can be sorted out soon.

2 Likes

Hi @basualdo, I got the image to load if I gave your note field a label in the XLSForm. Can you please try this on your end and see if it solves the issue?

1 Like

Hi @Josh. I added text to the label field and it worked! but only once… I deleted the project and uploaded it again (with a different name) and I’m stucked with the same problem again. I’ve tried 5 times now and the missing file error keeps on coming even though the Label field has text:

Does anything else come to your mind?

ThanksDownloadfileTEST2.xlsx|attachment (185.2 KB)

@Josh I think i’m unto something. The error comes if I deploy the project as follows:

1.New Project. Choose File
2.Deploy
3. Configuration, Media, Choose Files

What I did this time was:

1.New Project. Choose File
2.Configuration, Media, Choose Files
3. Deploy

The switching of steps 2 and 3 seem to solve the problem because now KoboCollect downloads all the external files and displays its content properly.

Thanks a lot for helping me try to solve the issue. I hope this can help other users as well.

Luis

1 Like

@basualdo thank you for digging into this! Definitely sounds like it could be a bug. We’ll keep running some tests on our end and hopefully sort this out asap.

Edit: not a bug, as explained below.

2 Likes

Hi @basualdo, the new behaviour of adding media to a project is as you found in the second case: add media before deployment. This has been done intentionally so that external media can now be viewed in the preview of a form before making it live. Each time new media is then added after deployment, the form must be redeployed for the changes to be made live — this is different to the old behaviour where you didn’t need to redeploy.

2 Likes

Hi @basualdo
Thank you for your solution.
I had the same problem.
I fixed with your solution.
Thank you a lot

3 Likes

Welcome to the community, @jstephio! Thank you for confirming.

Hi @basualdo ,

Your solution helped in solving this issue for me.
In my scenario I was still getting the error after redeploying the form. I then tried the following steps which worked:

  1. Delete the itemsets.csv file,
  2. Deploy the form.
  3. Go to media and add the itemsets.csv file
  4. Deploy the form
  5. Now when kobo app gets the form I no longer get itemsets.csv missing error: File: /storage/emulated/0/Android/data/org.koboc.collect.android/files/projects/…/forms/…/itemsets.csv is missing.
1 Like

Welcome to the community, @pkinuthia! Thank you for sharing the solution with the entire community! :clap: :heart: :partying_face: