On startup, and when forcing a library scan, the follow error message is displayed and the scan does not complete
2024-03-24T20:16:20:ERROR:Unmanic.LibraryScannerManager - [FORMATTED] - Exception in retrieving library scanner trigger LibraryScannerManager: - unsupported operand type(s) for +: 'datetime.datetime' and 'int'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/unmanic/libs/libraryscanner.py", line 121, in run
self.scheduled_job()
File "/usr/local/lib/python3.10/dist-packages/unmanic/libs/libraryscanner.py", line 152, in scheduled_job
if not self.system_configuration_is_valid():
File "/usr/local/lib/python3.10/dist-packages/unmanic/libs/libraryscanner.py", line 187, in system_configuration_is_valid
if not Library.within_library_count_limits(self.data_queues.get('frontend_messages')):
File "/usr/local/lib/python3.10/dist-packages/unmanic/libs/library.py", line 153, in within_library_count_limits
s.register_unmanic()
File "/usr/local/lib/python3.10/dist-packages/unmanic/libs/session.py", line 455, in register_unmanic
if not force and self.__check_session_valid():
File "/usr/local/lib/python3.10/dist-packages/unmanic/libs/session.py", line 146, in __check_session_valid
if not self.__created_older_than_x_days(days=2):
File "/usr/local/lib/python3.10/dist-packages/unmanic/libs/session.py", line 122, in __created_older_than_x_days
time_when_session_expires = self.created + seconds
TypeError: unsupported operand type(s) for +: 'datetime.datetime' and 'int'
Steps to Reproduce
Using the josh5/unmanic:latest Docker image, started like this:
I'm wondering if the code in the libs/session.py library (line 167) is setting a class variable.
# Print only the accurate update time in debug log
from datetime import datetime
created = datetime.fromtimestamp(seconds)
# ^^^^^^ line 167
self.logger.debug('Updated session at %s', str(created))
A quick hack to change the variable name seems to have worked.
x_created = datetime.fromtimestamp(seconds)
self.logger.debug('Updated session at %s', str(x_created))
I'll admit I'm not a Python expert, but that the first time I've run across a conflict between a local and class variable.
Description
On startup, and when forcing a library scan, the follow error message is displayed and the scan does not complete
Steps to Reproduce
Using the
josh5/unmanic:latest
Docker image, started like this:I'm wondering if the code in the
libs/session.py
library (line 167) is setting a class variable.A quick hack to change the variable name seems to have worked.
I'll admit I'm not a Python expert, but that the first time I've run across a conflict between a local and class variable.