Community Health Toolkit

Upload-contact-forms command fails with original CHT forms

App version 3.14

Dear all,

I wanted to do some minor modification to the person-create.xlsx form.
I than executed the command

cht --local convert-contact-forms upload-contact-forms

The xlsx forms get converted to xml with success, but the second step (uploading the forms into the app) fails for all contact forms.

The error message is:

ERROR Error found while validating .... Validation response: Error: connect ECONNREFUSED 127.0.0.1:5988
ERROR Error: One or more forms appears to have errors found by the API validation endpoint.
    at module.exports (/usr/local/lib/node_modules/cht-conf/src/lib/validate-forms.js:51:11)
    at process._tickCallback (internal/process/next_tick.js:68:7)

I am not sure what to do with it. The forms itself are well formatted (most of them are unchanged)

Any hints?

Hi @raf ,

I think that first error message is the relevant one. cht-conf is attempting to connect to cht-core to test that the forms are valid. Even if you managed to skip through validation it would still fail to upload if it can’t reach the server.

Using the --local option tells cht-conf to use the URL in your COUCH_URL environment variable. Check if that’s set, and if it is, ensure that it’s set correctly including admin credentials. If it’s not set correctly, you can use --url=... to specify the path and credentials to your CHT instance, as in this documentation.

Let me know if that doesn’t work!