I think this error is caused by the spaces in your directory path. /mnt/c/Users/david.njuguna/Desktop/eCHIS workshop/source code/config-echis-2.0/forms/app/death_report.xlsx.
Specifically the folder names “eCHIS workshop” and “source code”. I was able to recreate this error locally by updating the folder containing my config to also include a space. Hopefully you can resolve your error by updating those folder names (to something like “eCHIS_workshop” and “source_code”).
That being said, this is poor behavior and should also be fixed in cht-conf. I have logged:
Thank you @irene@jkuester for the highlight and resolution of this error. For future proofing could the convert-app-forms service accept URLs as strings encapsulated in quotes, for example in the path name given above, the path argument would be written as “/mnt/c/Users/david.njuguna/Desktop/eCHIS workshop/source code/config-echis-2.0/forms/app/death_report.xlsx”
I am converting app forms for our current project and I get the errors below:
pyxform.errors.PyXFormError: Unknown question type ‘db:national_office’, from the county_edit form. I have the forms for creating national, county and sub county place, and get stuck when converting county_officer-edit form
@oyierphil for your first error, can you try switching to the new style of defining contact selectors in your form? I believe that the old style of using
does not work with custom place types (like national_office) but only with the built-in clinic , health_center , district_hospital, and person. To select a contact with a custom type, you should be able to use:
@oyierphil regarding the second error, you should review your config for schedules and verify that it has the expected structure. (Specifically, I wonder if you may have set schedules to be an object instead of an array…)
I reviewed the documentation and made changes on the configs, the errors were resolved, but have new errors on some forms for places. Sorting them out tomorrow then testing, will update if everything works
Sorted the issues with the forms and now testing on our test server. I get the error below when I run the command to convert and upload forms:
“ERROR Failed to get a response from https://XXXX:****@X.X.X.X/XXXX/. Maybe you entered the wrong URL, wrong port or the instance is not started. Please check and try again.”
Both containers are running, I can ping the VM and get response. I noted the docker-compose.yml was missing from the project folder today, downloading using curl command brought a 404 error, thus had to edit the contents of the file manually., start the containers and try again to convert the files,will appreciate your insights
Ah, yes @oyierphil, assuming you are working with a 3.x version of the CHT (and are not trying to test with the upcoming 4.0 architecture) then you should probably user this link: https://raw.githubusercontent.com/medic/cht-core/3.16.0/docker-compose.yml and load the file from the 3.16.0 tag. The master branch has now been updated with the new architecture changes coming in 4.0.0 and that involves significant changes to the docker-compose configurations…
Also, in regards to your previously mentioned error, I cannot tell from that bit of logs exactly what might be causing the issue, but one thing to check would be your port mapping. Is the CHT test instance exposed on 443 or on a different port? (It does not look like you are using an alternative port in your url connection string.) Is that port open and accepting traffic through the firewall?
FYI @irene@DavidKN the issue with using cht-conf in a directory with spaces in the path has been solved in the latest release! The new version of cht-conf will properly escape the spaces in the path and avoid the internal error (thanks @andrablaj!).