Enable adding contacts in a blank project deployed onlocal test environment for CHT instance

Hello community

Am following these instructions to set deploy a blank project on my remote CHT instance, however when i try to create a health facility by clicking on the New Health Facility tab i get Error loading form. Please try again or check with an administrator. . as seen below

I have tried to add the contacts using via cht-conf using csv files but i think the prior issue is still hampering this process to…

Kindly requesting for your thoughts ?

@diana @mrjones

Hi @cliff

Could you, please, share your browser logs to see what error you’re getting?
Thanks!

hello @diana

the full details inbox.js:3 action SET_SELECTED_CONTACT @ 08:58:12.831inbox.js:3 action SET_F - Pastebin.com

Thanks

@diana i have fixed it ,

my server host keeps switching its IP ,so i switched accordingly

Thanks

@diana may be just to get some clarifications from you why the issue comes up again to loading contacts in csv-json docs with cht-conf ?

Hi @cliff

I’m not sure I understand. When using cht-conf to upload contacts, forms should not be needed, so it’s unlikely this is the same problem.
Can you please share what error are you getting with cht-conf?
Thanks!

sure @diana the forms are not needed,i am adding contacts in the cvs files .I manged to add the facilities .
However on creating CHW Areas, CHW Contacts and Users as instructed here i run into

with cht --url=https://medic:password@localhost --accept-self-signed-certs create-users yet i do have the user.csv in the base project directory as seen in the screenshot above

1 Like

Hi @cliff

I’m not entirely certain about this, but it looks like your csv file name is users .csv (space before .). Can you please make sure this is not the case?
Thanks

thanks @diana

the space was causing issues…

Now running into

ERROR StatusCodeError: 400 - {"code":400,"error":{"message":"Missing required fields: username","translationKey":"fields.required","translationParams":{"fields":"username"}}}

I do have the username field and its corresponding value in my users.csv

Hi @cliff

I’m afraid that without seeing the contents of your csv file, I’m unable to help you debug this.
Please share the file, if you’re comfortable with that (you may want to change passwords and other sensitive information before sharing).
This feature was very recently debugged and was confirmed to work as expected.
Thanks!

hello @diana these are the contents in the csv file

username ,password,roles,name,phone,contact.name,contact.phone,contact.sex,contact.age,plaace.type,place.name,place.parent
mmutiso,q3Z5-vH5,district-admin,Mary mutiso,703534813,May mutiso,703534813,female,41,health_center,Mary mutiso's area,58cda4c9-7af5-5b45-9be3-316d5dfb3fce

Does this suffice ?

Hi @cliff

It looks like your username field has an extra space before the comma. Can you please remove that space and try again?
The csv file headers must match requirements exactly, no extra characters.

Thanks.

1 Like

Also, this should be place.type.

2 Likes

thanks @diana & @binod ,

it works now :grinning_face_with_smiling_eyes: