Error importing concepts into openmrs from OCL

Here is the error i am getting when trying to import concepts to OpenMRS from Open Concept Lab

HTTP/1.1 204 No Content caused by: java.io.IOException: HTTP/1.1 204 No Content at org.openmrs.module.openconceptlab.client.OclClient.executeExportRequest(OclClient.java:138) at org.openmrs.module.openconceptlab.client.OclClient.fetchOclConcepts(OclClient.java:129) at org.openmrs.module.openconceptlab.client.OclClient.fetchOclConcepts(OclClient.java:210) at org.openmrs.module.openconceptlab.importer.Importer$2.run(Importer.java:152)

Can anyone help.

What was the URL you added for the subscription?

https://api.openconceptlab.org/orgs/OS4H/collections/AIC/031/

This is the URL i used, which is from a dictionary i created. I have imported from this same dictionary previously as well.

Assuming you have a version of your collection / dictionary called 031 that all looks correct. The “No Content” response, though, is from the OCL server itself.

@paynejd @jamlung any insight into what might’ve happened to the https://api.openconceptlab.org/orgs/OS4H/collections/AIC/031/export/ URL?

1 Like

Hi @opensolutions and @ibacher , I started looking into this and I think you might have found a bug. I let our developer know about this, so I will update you with more information once it’s available.

Thank you for your help.

Maybe it was a temporary bug or it has been fixed? When I visit that URL, I get a zipped export.json file containing a collection with 12 concepts and 9 mappings.

1 Like

Yeah, now the export seems to be working. @opensolutions can you verify that this is fixed?

Yes it is fixed, thanks for your help.

2 Likes

I still have the same issue with my OHRI dictionaries. For now, I am downloading the zip files and uploading them

1 Like

Hi @wamz, is there a link to the dictionary you are having an issue with? Please feel free to Slack message me directly (@Joe Amlung) on the OpenMRS Slack if it’s not appropriate to post it here. Hopefully I can verify and troubleshoot the issue.

1 Like

I am getting the same error as before not sure what happened. From the screen shot you can see the first time i got the error then it worked and now getting the same error again.

Is it this same link as before?

https://api.openconceptlab.org/orgs/OS4H/collections/AIC/031/export/

This link is working for me. There’s a chance that there was a quick deployment happening that may have interrupted your export.

https://api.openconceptlab.org/orgs/OS4H/collections/AIC/032 This is the link, It is a new version of the dictionary. I also tried to import in again and it gave me the same error.

Is it perhaps because there is no export version queued? I clicked the button to download the Export Version and there is not an export available (which there should have been one created automatically but maybe the system missed it?).

After noticing that, I clicked Queue Export, and then the link worked for me.

@opensolutions Does this fix the problem?

I am still getting the same error. When i got the error last time you said that it might have been a bug?

HTTP/1.1 204 No Content caused by: java.io.IOException: HTTP/1.1 204 No Content at org.openmrs.module.openconceptlab.client.OclClient.executeExportRequest(OclClient.java:138) at org.openmrs.module.openconceptlab.client.OclClient.fetchOclConcepts(OclClient.java:129) at org.openmrs.module.openconceptlab.client.OclClient.fetchOclConcepts(OclClient.java:210) at org.openmrs.module.openconceptlab.importer.Importer$2.run(Importer.java:152)

This is the error i am getting.

Yeah, one bug we’ve discovered is that the export is not automatically being created when you create a new version of the collection. It should be automatically created, and then when you point OpenMRS to it, it should be able to get the export without a 204. That fix should be deployed tomorrow.

In the mean time, you may need to queue the export manually (i.e. using the steps I showed in my last message in this post) to avoid getting that 204 error.

However, if you’re still getting the 204 error even when the export is available, then there may be something bigger going on that we may need to do some detailed troubleshooting on.

2 Likes

Ok thanks for your help. Got it uploaded based on your previous post.

2 Likes