regulaforensics / DocumentReader-web-python-client

Regula Document Reader web API Python 3.5+ client

Home Page:https://regulaforensics.com

Repository from Github https://github.comregulaforensics/DocumentReader-web-python-clientRepository from Github https://github.comregulaforensics/DocumentReader-web-python-client

Error processing responses that do not include 'FieldName'.

JaffeMarques opened this issue · comments

Occasionally, the response body is missing the expected 'FieldName' in the file 'webclient/gen/api_client.py' at line 123. This issue occurs right at the beginning when the request is made, before any attempt is made to read the response body. The code likely requires a try-catch statement to handle the missing field gracefully. It's also worth considering whether 'FieldName' should always be present in the response.

I tested adding a try-catch block around the code, and the error stopped occurring. I also added a print statement to log the absence of 'FieldName' when it is missing.

image

Reponse body:
image

Hi @JaffeMarques. Unfortunately, I wasn't able to reproduce described behavior on DocumentReader version 7.4. Could you please provide more information, like:

  • Document type (passport, ID card, etc.) and scenario (Ocr, Full_process, etc.)
  • Your library version and server (SDK) version if you are using non-public API
  • Error persistency (Is it persistent error or it can appear at times)?
  • Parameters for ProcessParams. It would be cool if you can provide a piece of code.
  • Have you ever get such error with any other documents?

Hi @JaffeMarques, we released new version of our library. Could you please recheck your issue with new version v7.4.45?

https://github.com/regulaforensics/DocumentReader-web-python-client/tree/v7.4.45