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

Can be success = False but no error #16

Closed
robmarkcole opened this issue Oct 4, 2019 · 0 comments
Closed

Can be success = False but no error #16

robmarkcole opened this issue Oct 4, 2019 · 0 comments

Comments

@robmarkcole
Copy link
Owner

robmarkcole commented Oct 4, 2019

Reported on the forums by @Reneeetje:

2019-10-03 18:01:06 ERROR (MainThread) [homeassistant.helpers.entity] Update for image_processing.detectie_persoon_tpu_voordeur fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 261, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 439, in async_device_update
    await self.async_update()
  File "/usr/src/homeassistant/homeassistant/components/image_processing/__init__.py", line 136, 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 150, in process_image
    self._dsobject.detect(image)
  File "/usr/local/lib/python3.7/site-packages/deepstack/core.py", line 129, in detect
    error = response.json()["error"]
KeyError: 'error'

This occurs at:

        if response.status_code == HTTP_OK:
            if response.json()["success"]:
                self._predictions = response.json()["predictions"]
            else:
                error = response.json()["error"]
                raise DeepstackException(f"Error from Deepstack: {error}")
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

1 participant