jellyfin / mopidy-jellyfin

Jellyfin Extension for Mopidy
https://jellyfin.org
Apache License 2.0
93 stars 16 forks source link

TypeError: unsupported operand type(s) for /: 'NoneType' and 'int' #71

Closed arthurlutz closed 4 years ago

arthurlutz commented 4 years ago
2020-07-09 20:21:28,316 ERROR [14914:Core-8] mopidy.core.library: JellyfinBackend backend caused an exception.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/mopidy_jellyfin/utils.py", line 24, in _memoized
    value, last_update = self.cache[args]
KeyError: (<mopidy_jellyfin.remote.JellyfinHandler object at 0x73c7c990>, 'f2441063eac85b015702bdd430e0756c')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/mopidy/core/library.py", line 17, in _backend_error_handling
    yield
  File "/usr/local/lib/python3.7/dist-packages/mopidy/core/library.py", line 217, in lookup
    result = future.get()
  File "/usr/local/lib/python3.7/dist-packages/pykka/_threading.py", line 45, in get
    _compat.reraise(*self._data['exc_info'])
  File "/usr/local/lib/python3.7/dist-packages/pykka/_compat/__init__.py", line 29, in reraise
    raise value
  File "/usr/local/lib/python3.7/dist-packages/pykka/_actor.py", line 193, in _actor_loop
    response = self._handle_receive(envelope.message)
  File "/usr/local/lib/python3.7/dist-packages/pykka/_actor.py", line 299, in _handle_receive
    return callee(*message.args, **message.kwargs)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_jellyfin/library.py", line 40, in lookup
    tracks = [self.backend.remote.get_track(track_id)]
  File "/usr/local/lib/python3.7/dist-packages/mopidy_jellyfin/utils.py", line 34, in _memoized
    value = self.func(*args)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_jellyfin/remote.py", line 511, in get_track
    return self.create_track(track)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_jellyfin/remote.py", line 469, in create_track
    length=self.ticks_to_milliseconds(track.get('RunTimeTicks'))
  File "/usr/local/lib/python3.7/dist-packages/mopidy_jellyfin/remote.py", line 868, in ticks_to_milliseconds
    return int(ticks / 10000)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

Once it has crashed like that, (not sure what causes it) I have to restart mopidy to get it to run again.

mcarlton00 commented 4 years ago

Same as the other one, I need details. Methods to replicate. Again indicating either a corrupted local cache or bad data from the server