unifi-protect-video-downloader
unifi-protect-video-downloader copied to clipboard
event_count_by_camera motion: RuntimeError: generator raised StopIteration
Originally posted by @hakarune in https://github.com/danielfernau/unifi-protect-video-downloader/issues/29#issuecomment-1056380725
I just pulled the newest and this is still an issue `docker run -v /sharedfolders/Backups/Camera/UniFi:/downloads unifitoolbox/protect-archiver events --address=10.1.1.1 --username=ubnt --password=XXXXXX --use-subfolders --cameras=all --skip-existing-files --start=2022-02-23 --end=2022-2-28 /downloads/ Getting camera list Successfully retrieved data from https://10.1.1.1:443/proxy/protect/api/cameras Cameras found:
- Front Door (60e91f0302cb6603870003fb)
- Baby Monitor 1 (621aae0a01f6bb0387001e03)
- Driveway (613fb4960060a603870086d4)
- Garage (613aa2b500d2a6038700704c)
- Game Room Camera (61662dc60325dd0387005210) Getting motion event list Successfully retrieved data from https://10.1.1.1:443/proxy/protect/api/events?type=motion&start=1645574400000&end=1646006400000 Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/protect_archiver/downloader/get_motion_event_list.py", line 53, in
f"{event_count_by_camera[x]} motion" StopIteration The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/protect_archiver/cli/events.py", line 192, in events motion_event_list = client.get_motion_event_list(start, end, camera_list) File "/usr/local/lib/python3.8/site-packages/protect_archiver/client/init.py", line 90, in get_motion_event_list return Downloader.get_motion_event_list(self.session, start, end, camera_list) File "/usr/local/lib/python3.8/site-packages/protect_archiver/downloader/init.py", line 39, in get_motion_event_list return get_motion_event_list(session, start, end, camera_list) File "/usr/local/lib/python3.8/site-packages/protect_archiver/downloader/get_motion_event_list.py", line 52, in get_motion_event_list "\n".join( RuntimeError: generator raised StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/bin/protect-archiver", line 8, in
sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/protect_archiver/cli/init.py", line 21, in main cli.main() File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/protect_archiver/cli/events.py", line 224, in events except Errors.ProtectError as e: TypeError: catching classes that do not inherit from BaseException is not allowed `