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

local variable 'timestamp_save_path' referenced before assignment #102

Closed
geftactics opened this issue Feb 25, 2021 · 0 comments · Fixed by #103
Closed

local variable 'timestamp_save_path' referenced before assignment #102

geftactics opened this issue Feb 25, 2021 · 0 comments · Fixed by #103
Labels
bug Something isn't working

Comments

@geftactics
Copy link

geftactics commented Feb 25, 2021

I'm seeing the following error in my logs:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    raise exc
  File "/usr/src/homeassistant/homeassistant/components/image_processing/__init__.py", line 132, in async_update
    await self.async_process_image(image.content)
  File "/usr/src/homeassistant/homeassistant/components/image_processing/__init__.py", line 112, in async_process_image
    return await self.hass.async_add_executor_job(self.process_image, image)
  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/amazon_rekognition/image_processing.py", line 413, in process_image
    saved_image_path = self.save_image(
  File "/config/custom_components/amazon_rekognition/image_processing.py", line 539, in save_image
    return str(timestamp_save_path)
UnboundLocalError: local variable 'timestamp_save_path' referenced before assignment

I'm not setting the save_timestamped_file value in my config - As it should default to False if that has any bearing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants