jellyfin / mopidy-jellyfin

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

cleaned_artist = unidecode(raw_artist[0]).lower() IndexError: string index out of range #72

Closed arthurlutz closed 3 years ago

arthurlutz commented 4 years ago
2020-07-10 18:23:34,051 ERROR [16552:MpdSession-33] pykka: Unhandled exception in MpdSession (urn:uuid:f487f94d-459b-40c3-baa0-492b75b39937):
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]
TypeError: unhashable type: 'dict'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  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 307, in _handle_receive
    return self.on_receive(message)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/network.py", line 443, in on_receive
    self.on_line_received(line)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/session.py", line 32, in on_line_received
    response = self.dispatcher.handle_request(line)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 46, in handle_request
    return self._call_next_filter(request, response, filter_chain)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 69, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 77, in _catch_mpd_ack_errors_filter
    return self._call_next_filter(request, response, filter_chain)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 69, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 87, in _authenticate_filter
    return self._call_next_filter(request, response, filter_chain)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 69, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 106, in _command_list_filter
    response = self._call_next_filter(request, response, filter_chain)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 69, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 139, in _idle_filter
    response = self._call_next_filter(request, response, filter_chain)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 69, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 152, in _add_ok_filter
    response = self._call_next_filter(request, response, filter_chain)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 69, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 164, in _call_handler_filter
    response = self._format_response(self._call_handler(request))
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/dispatcher.py", line 178, in _call_handler
    return protocol.commands.call(tokens, context=self.context)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/protocol/__init__.py", line 212, in call
    return self.handlers[tokens[0]](context, *tokens[1:])
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/protocol/__init__.py", line 170, in validate
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_mpd/protocol/music_db.py", line 145, in find
    results = context.core.library.search(query=query, exact=True).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 69, in search
    return self.backend.remote.exact_search(query)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_jellyfin/utils.py", line 39, in _memoized
    return self.func(*args)
  File "/usr/local/lib/python3.7/dist-packages/mopidy_jellyfin/remote.py", line 639, in exact_search
    cleaned_artist = unidecode(raw_artist[0]).lower()
IndexError: string index out of range
arthurlutz commented 4 years ago

This renders the other bits of mopidy unusable. For example the MPD backend can't launch any music.

mcarlton00 commented 4 years ago

What were you doing when this happened? The traceback is indicating either it received bad data from the server or that the local cache in memory got corrupted somehow, which I've never seen happen

mcarlton00 commented 3 years ago

This is fixed in #82