runningman84 / home-assistant-apps

home assistant apps based on appdaemon
GNU General Public License v3.0
21 stars 7 forks source link

error about camera_snapshot #8

Closed vpomax closed 5 years ago

vpomax commented 5 years ago

Often after alarm_system activation in Appdaemon it show errors about camera_snapshot... can you help me? I have Home Assistant Hassio v. 0.83.2

2019-01-16 18:09:08.108181 INFO alarm_system: Starting camera snapshot timer
2019-01-16 18:09:09.010918 WARNING AppDaemon: ------------------------------------------------------------
2019-01-16 18:09:09.012404 WARNING AppDaemon: Unexpected error in worker for App alarm_system:
2019-01-16 18:09:09.014793 WARNING AppDaemon: Worker Ags: {'name': 'alarm_system', 'id': UUID('6de5b787-b9a0-4064-bdfe-428fa1669380'), 'type': 'timer', 'function': <bound method AlarmSystem.camera_snapshot of <alarm.AlarmSystem object at 0x746650f0>>, 'kwargs': {}}
2019-01-16 18:09:09.018667 WARNING AppDaemon: ------------------------------------------------------------
2019-01-16 18:09:09.021501 WARNING AppDaemon: Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 586, in worker
    funcref(self.sanitize_timer_kwargs(app, args["kwargs"]))
  File "/config/appdaemon/apps/alarm.py", line 287, in camera_snapshot
    self.log("Camera snapshot {} stored as {}".format(self._snap_count, filename))
UnboundLocalError: local variable 'filename' referenced before assignment
2019-01-16 18:09:09.024166 WARNING AppDaemon: ------------------------------------------------------------
runningman84 commented 5 years ago

Thanks for this bug report. I just fixed it with my latest commit: https://github.com/runningman84/home-assistant-apps/commit/c6bb113491ede78221d009ed015e30fe4d5b5193#diff-14a20730a1e53bc371eecb5c01ed3b94

If you still see this error just reopen this issue... sorry for my late response