Closed Swallowtail23 closed 1 year ago
Ok I think I know whats going on here. Currently the way the list of "missing" events is generated is as follows:
What has happened in your case, event 6392950f029abf03e40b7a5a
has been popped off the download queue and is currently being uploaded and while thats happening the periodic missing check was triggered and it was not in the queue so was considered missing and re-added.
I will make a pass through this logic to make it more robust
Should be fixed in v0.8.4, feel free to re-open if you still get issues.
Container build should be available shortly.
As for your comment about file path being shown. If you run with -v
it will be shown.
I haven't updated to the new .10 versions yet, but I'm getting unique constraint issues again:
ERROR: 2023-11-04 09:19:04 [ ERROR ] unifi_protect_backup.uploader : [65457fce036fb703e401cc26] Unexpected exception occurred, abandoning event 65457fce036fb703e401cc26:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/unifi_protect_backup/uploader.py", line 78, in start
await self._update_database(event, destination)
File "/usr/lib/python3.10/site-packages/unifi_protect_backup/uploader.py", line 108, in _update_database
await self._db.execute(
File "/usr/lib/python3.10/site-packages/aiosqlite/core.py", line 184, in execute
cursor = await self._execute(self._conn.execute, sql, parameters)
File "/usr/lib/python3.10/site-packages/aiosqlite/core.py", line 129, in _execute
return await future
File "/usr/lib/python3.10/site-packages/aiosqlite/core.py", line 102, in run
result = function()
sqlite3.IntegrityError: UNIQUE constraint failed: events.id
Unifi Protect Backup version: 0.9.3 Unifi Protect version: UNVR 3.1.16, Protect 2.9.33 Are you using a docker container or native?: Container
Description
Non unique violation errors
What I Did
Strange sequence... Why would it have downloaded/uploaded the same event twice? Presumably at some point something has failed and it is retrying, but the fail/catch/retry is ending up in a traceback, not an error routine.
It would also be useful to tag an event like this with the filename that was to be written, so it can be checked for successful upload.