Kobo-Docker: Problems XLSForms referencing external .CSV files

74 views
Skip to first unread message

Eric Kansa

unread,
Jun 16, 2018, 6:46:07 PM6/16/18
to KoBo Developers

Hi all,


I've just deployed kobo-docker (absolute latest build on an Ubuntu 16.04 server) and everything appears to be working properly. However, I'm having trouble with forms that reference external CSV files. None of the following features of XLSforms have worked for me:

  • pulldata
  • select_one_from_file
  • select_one_external

My XLSforms validate well with (https://opendatakit.org/xlsform/). When I attempt to deploy a form with "select_one_from_file" I get an error in that reads "Unknown question type 'select_one_from_file...". Pulldata and "select_one_external" forms do not through errors, but then they don't work with enketo_express in my instance of Kobotoolbox. The external files just aren't used in the web browser form.


I need to reference external data in my forms to populate pick-lists that will need to change. I'm at a complete loss on how to understand what's wrong. It would be great if this repo could include some XLSforms to use in testing (especially testing of more complex features like access of CSV files from a form), so I can eliminate the possibility that I just have badly designed forms and Kobotoolbox is working fine.


I looked into this problem pretty extensively. When I have a valid XLSform with an "external_choices" sheet, and I can upload it into Kobotoolbox, but when I attempt to deploy, I get an HTTP 500 error with the POST request to this address: https://my-kobo-deployment.org/assets/{identifier}/deployment/


I looked at all the log files I could find and found no clear reason for the trouble. Could it be a permissions issue?


Cross-Posted this call for help here:

https://github.com/kobotoolbox/kobo-docker/issues/183


Any help will be much appreciated!


Eric Kansa

unread,
Jun 29, 2018, 11:15:47 AM6/29/18
to KoBo Developers
Hello? Anyone have any suggestions?
-E

John Milner

unread,
Jun 29, 2018, 5:27:29 PM6/29/18
to kobo-de...@googlegroups.com
Hi Eric,

`select_one_external` works with KoBo/ODK Collect but not Enketo; see https://groups.google.com/d/msg/enketo-users/sQb8_X6rXgA/T0FI_Y2bBgAJ.

`pulldata()` and `select_one_from_file` probably require a newer version of Pyxform. If you are comfortable editing Python code and rebuilding Docker images, applying the changes from following commits should allow you to use those features:


Caveat: these changes are not extensively tested, and the second commit will disable export of SPSS labels.

Best of luck,

John

--
You received this message because you are subscribed to the Google Groups "KoBo Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kobo-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Kansa

unread,
Jul 1, 2018, 8:10:16 AM7/1/18
to kobo-de...@googlegroups.com
Dear John,

THANKS! That (mostly) did the trick. I had to keep not totally delete the kobocat  onadata/apps/api/__init__.py
file because I got errors from Django as it was expecting that file.

There seems to be some issue with KPI with the newer version of  pyxform in the data export / reports viewing features. The logs just give a 500 error message so I can't be more specific.  Here's a link that makes an error:

https://{{ MY DOMAIN }}/reports/aovisvpD69aWwVAcewsdrb/?names=

I can however export the data using the XLS legacy exporter. I may experiment with using my new docker images with the newer pyxform for data collection, and then switch things back to the standard kobo-docker images for data export.

Anyway, thanks for the help. Kobo-docker is very cool, and I'd love to see the new pyxform incorporated into the standard issue kobo-docker release.

Best!
-Eric









To unsubscribe from this group and stop receiving emails from it, send an email to kobo-develope...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "KoBo Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kobo-develope...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages