Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise JSONDecodeError("Expecting value", s, err.value) from None #984

Open
abuelgasimsaadeldin opened this issue Dec 5, 2022 · 1 comment

Comments

@abuelgasimsaadeldin
Copy link

abuelgasimsaadeldin commented Dec 5, 2022

Describe the bug
A clear and concise description of what the bug is.

An error occurs when trying to run compreface_webcam_recognition_demo.py on Desktop machine while CompreFace docker compose is run on server side.

To Reproduce
Steps to reproduce the behavior:

  1. Run docker-compose up on server side
  2. Obtain server IP address
  3. Test UI on desktop machine (works well)
  4. Run compreface_webcam_recognition_demo.py on desktop machine.
  5. See error

Expected behavior
A clear and concise description of what you expected to happen.

Webcam demo for face recognition to work as usual while docker container is run on server side.

Screenshots
If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

The webcam turns on, detects my face and draws the bounding box then it gets stuck and exits with the following error message shown:

Traceback (most recent call last):
  File "C:\Users\Abuelgasim\miniconda3\envs\compreface\lib\site-packages\requests\models.py", line 971, in json
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".\compreface_webcam_recognition_demo.py", line 141, in <module>
    threaded_camera.update()
  File ".\compreface_webcam_recognition_demo.py", line 133, in update
    data = self.recognition.recognize(byte_im)
  File "C:\Users\Abuelgasim\miniconda3\envs\compreface\lib\site-packages\compreface\service\recognition_service.py", line 68, in recognize
    return self.recognize_face_from_images.execute(request, self.options if options == {} else options)
  File "C:\Users\Abuelgasim\miniconda3\envs\compreface\lib\site-packages\compreface\use_cases\recognize_face_from_image.py", line 37, in execute
    result: dict = self.recognize_face_from_image.post(
  File "C:\Users\Abuelgasim\miniconda3\envs\compreface\lib\site-packages\compreface\client\recognize_face_from_image.py", line 63, in post
    return result.json()
  File "C:\Users\Abuelgasim\miniconda3\envs\compreface\lib\site-packages\requests\models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
@pospielov
Copy link
Collaborator

Hi, we checked it, and it works.
From logs, it looks like CompreFace returns, not JSON, which may happen only if one of the servers is down.
Could you check if CompreFace works from UI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants