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

Error with likes #43

Closed
flyingrub opened this issue Jan 19, 2015 · 7 comments
Closed

Error with likes #43

flyingrub opened this issue Jan 19, 2015 · 7 comments
Milestone

Comments

@flyingrub
Copy link

ERROR    Unhandled exception in MpdSession (urn:uuid:fbfd0421-ab77-4aa1-90ff-bfb6c1c8ead0):
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 366, 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 85, 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 167, 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/music_db.py", line 413, in lsinfo
    for path, lookup_future in context.browse(uri, recursive=False):
  File "/usr/lib/python2.7/dist-packages/mopidy/mpd/dispatcher.py", line 319, in browse
    for ref in future.get():
  File "/usr/lib/python2.7/dist-packages/pykka/future.py", line 299, in get
    exec('raise exc_info[0], exc_info[1], exc_info[2]')
  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 294, in _handle_receive
    return callee(*message['args'], **message['kwargs'])
  File "/usr/lib/python2.7/dist-packages/mopidy/core/library.py", line 73, in browse
    return backend.library.browse(uri).get()
  File "/usr/lib/python2.7/dist-packages/pykka/future.py", line 299, in get
    exec('raise exc_info[0], exc_info[1], exc_info[2]')
  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 294, in _handle_receive
    return callee(*message['args'], **message['kwargs'])
  File "/usr/share/mopidy/mopidy_soundcloud/library.py", line 148, in browse
    return self.list_liked()
  File "/usr/share/mopidy/mopidy_soundcloud/library.py", line 60, in list_liked
    logger.debug('Adding liked track %s to vfs' % data.name)
AttributeError: 'list' object has no attribute 'name'
@flyingrub
Copy link
Author

i think name should be replaced by title.
Why don't you use the soundcloud python wrapper its way more easier to code with it :)

https://github.com/soundcloud/soundcloud-python
example of use here : https://github.com/flyingrub/scdl

@shark0der
Copy link

Bumping this issue. Can't see/play my liked songs :(

@kantholtz
Copy link

As the error message suggests, there is a list in self.backend.remote_get_user_liked(). I have not looked at the code extensively but a very quick and dirty fix ist just to add this in library.py:

def list_liked(self):
    vfs_list = collections.OrderedDict()
    for data in self.backend.remote.get_user_liked():
        if type(data) == list:
            continue
        ...

This is working for me but it would be better to find out why there is an empty list in the result set of self.backend.remote.get_user_liked() in the first place.

@devonbarrett
Copy link

Bump

@s00500
Copy link

s00500 commented Nov 2, 2015

Bump! This is still an issue, thanks for the workaround, works for me as well!

@artistro08
Copy link

bump

@jodal
Copy link
Member

jodal commented Jan 27, 2016

Fixed by #69

@jodal jodal closed this as completed Jan 27, 2016
@jodal jodal added this to the v2.1 milestone Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants