robmarkcole / HASS-Deepstack-object

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

Error when recognising object #12

Closed Priva28 closed 5 years ago

Priva28 commented 5 years ago

I get this error whenever I run image_processing.scan service. How do I fix this?

Update for image_processing.person_detector fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    await self.async_device_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 375, in async_device_update
    await self.async_update()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/image_processing/__init__.py", line 132, in async_update
    await self.async_process_image(image.content)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/deepstack_object/image_processing.py", line 115, in process_image
    predictions_json = response.json()["predictions"]
KeyError: 'predictions'
Priva28 commented 5 years ago

After coming back and trying again after a few days, I now get a new error that tells me ConnectionError: Is deepstack_object running? or Update of deepstack_object is taking over 10 seconds. whenever I try to run image_processing.person_detector. It also shows the same with deepstack_face component. So far I have tried changing ip address of server, changing port, activating api, reinstalling but it doesn't seem to do anything. I used to see the request come through on the server side before but now nothing. I hope I can find a way to fix this cause I was really looking forward to using this component. Thanks for your help.

Priva28 commented 5 years ago

After activating API and installing noavx version, it now works perfectly.