Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled exception in MpdSession: AttributeError: 'NoneType' object has no attribute 'uri' #1188

Closed
wernight opened this issue May 21, 2015 · 6 comments
Assignees
Labels
C-bug Category: This is a bug

Comments

@wernight
Copy link

While starting to play a YouTube result for search (usually it works), ncmpcpp stopped responding and the log Mopidy log end looks like:

INFO     New MPD connection from [::ffff:172.17.42.1]:42326
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mopidy/utils/network.py", line 273, in recv_callback
    self.actor_ref.tell({'close': True})
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 437, in tell
    raise _ActorDeadError('%s not found' % self)
pykka.exceptions.ActorDeadError: MpdSession (urn:uuid:447ae1ed-a5bb-4dab-45dc-ceb3bef8bf72) not found
INFO     Youtube says: This video is unavailable. [Brandenburg]
INFO     New MPD connection from [::ffff:172.17.42.1]:47899
ERROR    Unhandled exception in MpdSession (urn:uuid:2b06674e-c7cf-42cc-a31c-8bbc5e8f548f):
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 200, in _actor_loop
    response = self._handle_receive(message)
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 303, in _handle_receive
    return self.on_receive(message)
  File "/usr/lib/python2.7/dist-packages/mopidy/utils/network.py", line 367, in on_receive
    self.on_line_received(line)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/session.py", line 33, in on_line_received
    response = self.dispatcher.handle_request(line)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 46, in handle_request
    return self._call_next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 67, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 75, in _catch_mpd_ack_errors_filter
    return self._call_next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 67, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 88, in _authenticate_filter
    return self._call_next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 67, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 104, in _command_list_filter
    response = self._call_next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 67, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 133, in _idle_filter
    response = self._call_next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 67, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 146, in _add_ok_filter
    response = self._call_next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 67, in _call_next_filter
    return next_filter(request, response, filter_chain)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 158, in _call_handler_filter
    response = self._format_response(self._call_handler(request))
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 172, in _call_handler
    return protocol.commands.call(tokens, context=self.context)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/protocol/__init__.py", line 178, in call
    return self.handlers[tokens[0]](context, *tokens[1:])
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/protocol/__init__.py", line 156, in validate
    return func(**callargs)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/protocol/status.py", line 42, in currentsong
    tl_track, position=position, stream_title=stream_title)
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/translator.py", line 36, in track_to_mpd_format
    ('file', track.uri or ''),
AttributeError: 'NoneType' object has no attribute 'uri'

From there on, ncpmcpp cannot successfully reconnect. Or it can connect but it's like there is a lag of one minute and nothing responds, so the server is like dead.

@wernight
Copy link
Author

YouTube music video matched was https://youtu.be/ybjJ4283OU8 searching Brandenburg Concertos.

@jodal
Copy link
Member

jodal commented Jun 25, 2015

@adamcik Wouldn't the response with the None-track returned by Mopidy-YouTube be rejected by Mopidy 1.1 and not affect the response from other backends? If so, I think we've done what we can with this issue in Mopidy core, and the remainder is a Mopidy-YouTube bug.

@jodal jodal added the C-bug Category: This is a bug label Jun 25, 2015
@jodal
Copy link
Member

jodal commented Jun 25, 2015

@dz0ny I'm assigning this to you on the assumption that a fix in Mopidy-YouTube is needed.

@adamcik
Copy link
Member

adamcik commented Jun 25, 2015

@jodal sounds about right, should we just open a new m-y bug and close this?

@jodal
Copy link
Member

jodal commented Jun 25, 2015

Might as well.

@jodal
Copy link
Member

jodal commented Sep 22, 2015

I believe this was fixed by natumbri/mopidy-youtube#35.

@jodal jodal closed this as completed Sep 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

4 participants