ODK Briefcase 1.17.3 pull alright but export CSV hung (both CLI & GUI)

1. What is the problem? Be very detailed.
I was testing the form created by Yaw (WHO COVID-19 A0 for First few cases) to record two cases. Convert the form using xls2xform, then -adb pushed the xml to an Android 6 phone-, followed by filling info from 2 cases/instances.
I was able to use Briefcase pull those two instances into my PC. I checked both xml files and they are indeed the correct records, here.
~\Documents\ODK Briefcase Storage\forms\A0 WHO COVID_19_ Minimum data reporting form\instances
I then proceeded to Export Tab, filled in the Export directory. Pressing [Export] button resulted in hung app. The banner near the [Export] button keeps moving, but clearly nothing is happening. No new files in the Export directory.
2. What app or server are you using and on what device and operating system? Include version numbers.
Windows 10, ODK-Briefcase-v1.17.3.jar, phone runs on an oldish Android 6.
3. What you have you tried to fix the problem?
Tried Ubuntu 18.04, ODK-Briefcase earlier versions 16, 12, same oldish phone.

Also tried CLI, but it comes back saying "xml not found" irrespective of where I put the xml file.
Here's one example:
~\Documents\covid-19\ODK> java -jar .\ODK-Briefcase-v1.17.3.jar --export
-id .\covid-19_A0.xml
-sd ".\briefStore\ODK Briefcase Storage"
-ed ".\briefCSV"
-f "first2.csv"
java : Error: Form .\covid-19_A0.xml not found
At line:1 char:1

  • java -jar .\ODK-Briefcase-v1.17.3.jar --export -id .\covid-19_A0.xml ...
  •   + CategoryInfo          : NotSpecified: (Error: Form .\covid-19_A0.xml not found:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
    
    

4. What steps can we take to reproduce the problem?
You can try WHO COVID-19 A0 form to fill in one case. Then use Briefcase 1.17.3 to pull and then export to CSV. Note: pulling is fine, but export is not.

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
Screenshot of hung Briefcase (BriefcaseExport_hung.png) and briefcase.log (briefcase_log.txtcovid-19_A0.xml (139.6 KB) ) and the blank form (xml).

Thanks for looking into this.
In desperation: any ideas how to export to CSVs offline (for field with limited internet)?

Introduction: I do research mostly on dementia in Europe but recently Covid attracts my attention too. So want to help with data collection.


briefcase_log.txt (10.6 KB)

Hello,

Regarding the "xml not found" in no.3; have you tried supplying the command with absolute paths instead of relative, e.g.
-id c:\my_data\covid-19_A0.xml" instead of ".\"
(and forward slashes if it's on linux)

If possible could you share the form instances (ie. the instance .xml-files) that you managed to pull into your PC?(unless they contain real data of course) Then I can try to import/export them here...

--
best
/emil

Thanks Emil for a prompt response. I did use slash in Linux and backslash in Windows. Here is the Linux one, and indeed pull worked:
$ java -jar ODK-Briefcase-v1.17.3.jar --pull_collect -od "/home/myusr/Documents/covid-19/ODK/odk" -sd "/home/myusr/Documents/covid-19/ODK/briefStore"

The directory /home/gindo/Documents/covid-19/ODK/briefStore/ODK Briefcase Storage doesn't exist. Creating it
. . .
Success pulling form A0 WHO COVID_19_ Minimum data reporting form
End of pull operation

I did pull 2 instances (one attached).

But when I tried exporting it:
$ java -jar ODK-Briefcase-v1.17.3.jar --export -ed "/home/gindo/Documents/covid-19/ODK/briefCSV" -sd "/home/gindo/Documents/covid-19/ODK/briefStore" -id "/home/gindo/Documents/covid-19/ODK/covid-19_A0.xml" -f "first2.csv"
Error: Form /home/gindo/Documents/covid-19/ODK/covid-19_A0.xml not found

Whatever I put in -id, I bumped into this error.

Any ideas would be greatly appreciated. (I have a suspicion I made an elementary mistake somewhere).

Cheers,
Gsubmission.xml (3.3 KB)

Hello again,

Thanks. I believe the error is that the argument to "-id" is supposed to be the form ID (and not the path).
So, the following works on my computer (using c:\temp as base path)

java -jar ODK-Briefcase-v1.17.3.jar --export -ed "c:\temp\ODK\briefCSV" -sd "c:\temp\ODK\briefStore" -id "covid-19_A0" -f "first2.csv"

Good luck :slight_smile:

best
/emil

Hi Emil,

Thanks for trying this out. Unfortunately it still hasn't worked for me. It gives "Error null".
I'll try on my Win10 machine shortly.
Curiously, where did you put the files (xml blank form, xml filled-instance forms)? Or how do you structure the folders under C:\temp\ODK? In desperation I might just copy that just to get this thing going.
Many thanks,
Gindo

Hi Emil,

Same with Win10. "Error null".

If you could share your folder structure, I'll just copy that.
Many thanks,
Gindo

Hi Gindo,

Weird - now I also get the "Error null" when I try with v. 1.17 from scratch (I have previously used v. 1.9.0 so perhaps that is why it worked when I tried it before?)

Anyway - if you update to v. 1.9.0 of ODK Briefcase it works without hickups.

  1. So if you unzip the attached files to e.g. c:\temp\x
  2. Then open ODK Briefcase v.1.9.0 (GUI) and set working dir to "c:\temp\x\WorkDir"
  3. Then make a "pull" from odk directory (copied from phone) - in the zip attached zipfile that would be c:\temp\x\FromPhone\odk

Then you can do the export either from the GUI or via cli with this command:

java -jar ODK-Briefcase-v1.9.0.jar --export -ed "c:\temp\x" -sd "c:\temp\x\WorkDir" -id "covid-19_A0" -f "first2.csv"

Let me know if that works out :slight_smile:

best
/emil
Attachment:
folders.zip (67.2 KB)

Hi Emil,
Thanks very much. Works like a charm!
I very much appreciate this.
Gindo