pyxform.errors.PyXFormError: Unknown question type 'db:supervisor'

NOTE: This is a public repository. Images or logs containing protected health information (PHI) must be fully-redacted.

Describe the Bug
A short description of the issue or error you are encountering:

Added a new workflow to the contact forms and when i push i get this error:
ERROR Traceback (most recent call last):
File “/usr/local/bin/xls2xform-medic”, line 10, in
File “/usr/local/lib/python2.7/dist-packages/pyxform/”, line 88, in main_cli
File “/usr/local/lib/python2.7/dist-packages/pyxform/”, line 25, in xls2xform_convert
xform_path, validate=validate, warnings=warnings)
File “/usr/local/lib/python2.7/dist-packages/pyxform/”, line 548, in print_xform_to_file
raise e
pyxform.errors.PyXFormError: Unknown question type ‘db:supervisor’.

I am using windows OS and i am failing to locate the directory above to update the question type dict file.

How To Reproduce The Issue
List steps for someone trying to reproduce the behavior. For example:

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

Expected Behavior
A short description of what you expected to happen:

If applicable, include the server or browser logs (check for PHI):

If applicable, add screenshots to help explain your problem (check for PHI):


  • Instance: (eg:, etc)
  • Browser: (eg: Firefox, Chrome, incognito mode, etc, which worked, which didn’t)
  • Client platform: (eg: Windows, MacOS, Linux)
  • App: (eg: webapp, admin, sentinel, api, couch2pg, medic-conf, etc)
  • Version: (eg: 2.15.0, 3.0.0, etc)

Additional Context
Add any other context about the problem here. What have you tried? Is there a workaround?

Hi @Jeanfaith234

I just saw your post here and wanted to know (out of curiosity), if it is even possible to have different person types…?
You are trying to load db:supervisor and i tried the same with my own person types but failed. Therefore i am very interested in the answers that we will written down here.

Welcome, @Jeanfaith234 to the CHT forum.

If you are in CHT version 3.10 or later, you can try this approach to select your contacts:

set the field type to string and appearance to `select-contact type-{{contact_type_1}} type-{{contact_type_2}}

If your contact type is supervisor, you must be able to put select-contact type-supervisor and it should give you a list of supervisors.

Hi @uensal ,
Yes, it is possible to have multiple contact types that represent persons.
You can define them in the contact_types section in app_settings.json (or base_settings.json) and set the person property to true.

I am unable to locate this on windows “/usr/local/lib/python2.7/dist-packages/pyxform/

You had mentioned that you want to update the question type in pyxform.

I am using windows OS and i am failing to locate the directory above to update the question type dict file.

But that might not be necessary if your CHT version is >= 3.10.

Can you please share which version of CHT is it?

@binod , its CHT version 3.8.0

Is it possible to upgrade to a recent version of CHT?

As you can see in our docs, the support life for version 3.8.0 has already ended on 19-Sep-2020.

If it is not possible to upgrade, and you want to modify the pyxform package locally, you might be able to find its location by using this command:

pip show pyxform-medic

Please let us know if it works.

Issue still persists even after updating the pyxforms

I noticed that you are running cht-conf using docker.
In that case, you might have to edit the pyxform package inside the docker container instead.

May I know why you have not installed/used cht-conf from Windows directly?

Also, I am waiting for your answer on this:

Is it possible to upgrade to a recent version of CHT?

@binod I did not install ch-conf from windows because am using a docker container.

I am still curious, why you are using a docker container to run cht-conf while it could be possible to run the CHT app on the docker container and use cht-conf on Windows to make the config changes. That way, it will be easier to edit the configuration files or to modify the pyxform package (if needed).

As mentioned in the cht-conf repo, when using Docker to run cht-conf:

You will have to copy or mount your config files into the container in order to be able to use the cht call to interact with a remote CHT instance.

However, if you want to continue running cht-conf from the docker, you might have to find and edit the pyxform package inside the docker container.

Also, you are using docker-compose run --rm, so the container must be removed after each run. In that case, editing the files in the container might not work.

What do you think about the upgrade option so that you can be better supported?

Is it possible to upgrade to a recent version of CHT?

@binod , let me try the upgrade version.
Will revert.