robmarkcole / HASS-Deepstack-face

Home Assistant custom component for using Deepstack face recognition
https://community.home-assistant.io/t/face-and-person-detection-with-deepstack-local-and-free/92041
MIT License
218 stars 68 forks source link

Error from Deepstack request, status code: 400 #31

Closed koldogut closed 3 years ago

koldogut commented 3 years ago

After upgrading to ver 0.8 I can now save stored faces but I'm getting this error when trying to teach new ones:

deepstack.core.DeepstackException: Error from Deepstack request, status code: 400

Detailed trace here:

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/deepstack_face/image_processing.py:259
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 13:48:57 (8 occurrences)
Last logged: 14:01:52

[23254560460912] Error from Deepstack request, status code: 400
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1484, in _execute_service
    await self._hass.async_add_executor_job(handler.job.target, service_call)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/deepstack_face/image_processing.py", line 161, in service_handle
    classifier.teach(name, file_path)
  File "/config/custom_components/deepstack_face/image_processing.py", line 259, in teach
    self._dsface.register(name, image)
  File "/usr/local/lib/python3.8/site-packages/deepstack/core.py", line 277, in register
    response = process_image(
  File "/usr/local/lib/python3.8/site-packages/deepstack/core.py", line 130, in process_image
    raise DeepstackException(
deepstack.core.DeepstackException: Error from Deepstack request, status code: 400

Face and object detection are working fine

DM-AU commented 3 years ago

I am having the same error but face detection stopped working some time ago. I can see the request being sent to Deepstack but the result just is not appearing in Home Assistant.

greberg commented 3 years ago

Same issue here.

robmarkcole commented 3 years ago

Unless you can isolate and reliably reproduce the 400 error, I am just guessing as to the cause

DivanX10 commented 3 years ago

I have a similar problem. More detailed here and here


У меня похожая проблема. Более подробно изложил здесь и здесь

maxi1134 commented 3 years ago

Same error just started happening today, this was working for a few weeks and now I get this behavior.

Is there anything I can provide to help with debugging?

robmarkcole commented 3 years ago

just started happening today - did you update deepstack also? I see the latest release mentions it addresses Face Register Not working so possibly something changed

interbiznw commented 3 years ago

looks like i was getting error 400 trying to have home assistant access it. and was fine from the deepstack UI.

Turned out my HA instance was on another subnet (although still accessible deepstack did not like that for some reason). I moved my deepstack instance over to other network and everything works fine now, all 200 responses

robmarkcole commented 3 years ago

please try latest deepstack and reopen if the issues persists and there are logs to debug

interbiznw commented 3 years ago

latest still gave me the 400 error unless the instance was on the same subnet., docker to docker with deepstack and deepstack ui worked fine. But Homeassistant on another subnet did not. Once I moved deepstack to same subnet as homeassistant, errors no longer happen