exadel-inc / exadel-inc/CompreFace

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

Open
#984 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

**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](https://user-images.githubusercontent.com/68045710/205605814-db235aa5-9c19-4fb0-8e85-e55066198f31.png)

**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
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)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.