fronzbot / blinkpy

A Python library for the Blink Camera system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not extract camera info: {'message': 'Camera not found', 'code': 500}

MarkusKress opened this issue · comments

I have the same Error during

blink.refresh(force=True)
or
blink.refresh():

Error is:
Could not extract camera info: {'message': 'Camera not found', 'code': 500}
Could not find thumbnail for camera unknown

I'm using 0.17.1

Originally posted by @MarkusKress in #481 (comment)

Hi @MarkusKress sorry about the delay here.

Three questions:

  1. How are you running the library? Just CLI or using home assistant, etc?
  2. Can you reproduce the error by starting a fresh Blink instance (whether in HA or CLI) and using the refresh function?
  3. Do the other cameras in your system still update despite the error (or does it prevent everything else from working)?
commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within seven days. Thank you for your contributions.

Maybe this is relevant, maybe not. If I have mini cameras on my account I would keep getting:

Traceback (most recent call last):
File "/home/src/src/BLINK/blinkhome.py", line 24, in
blink.refresh()
File "/usr/local/lib/python3.9/site-packages/blinkpy/helpers/util.py", line 144, in wrapper
result = method(*args, *kwargs)
File "/usr/local/lib/python3.9/site-packages/blinkpy/blinkpy.py", line 93, in refresh
sync_module.refresh(force_cache=(force or force_cache))
File "/usr/local/lib/python3.9/site-packages/blinkpy/sync_module.py", line 196, in refresh
self.cameras[camera_name].update(camera_info, force_cache=force_cache)
File "/usr/local/lib/python3.9/site-packages/blinkpy/camera.py", line 133, in update
self.extract_config_info(config)
File "/usr/local/lib/python3.9/site-packages/blinkpy/camera.py", line 139, in extract_config_info
self.name = config.get("name", "unknown")
AttributeError: 'NoneType' object has no attribute 'get'

Tracked it down to changing blinkpy/sync_module.py around line 195 from:

self.cameras[camera_name].update(camera_info, force_cache=force_cache)

to:

        if camera_info != None:
            self.cameras[camera_name].update(camera_info, force_cache=force_cache)

This let's me keep the minis on my account without killing the apps when refresh is called.

Cheers,
DrJES

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within seven days. Thank you for your contributions.

commented

This issue is now being closed due to inactivity.