gdrapp / hass-addons

MIT License
2 stars 23 forks source link

AttributeError: 'NoneType' object has no attribute 'get' #7

Open dimka2014 opened 3 years ago

dimka2014 commented 3 years ago

Hello, I got such error when I tried to use your extension:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/site-packages/watchdog/observers/api.py", line 199, in run
    self.dispatch_events(self.event_queue, self.timeout)
  File "/usr/lib/python3.8/site-packages/watchdog/observers/api.py", line 368, in dispatch_events
    handler.dispatch(event)
  File "/usr/lib/python3.8/site-packages/watchdog/events.py", line 537, in dispatch
    _method_map[event_type](event)
  File "/usr/bin/amazon-s3-backup/amazon-s3-backup.py", line 34, in on_created
    self.process(event)
  File "/usr/bin/amazon-s3-backup/amazon-s3-backup.py", line 53, in process
    upload_file(Path(event.src_path),
  File "/usr/bin/amazon-s3-backup/amazon-s3-backup.py", line 145, in upload_file
    snapshot_detail = supervisor_api.get_snapshot(slug)
  File "/usr/bin/amazon-s3-backup/supervisorapi.py", line 105, in get_snapshot
    return response.get("data")
AttributeError: 'NoneType' object has no attribute 'get'