Problems with soundcloud


#1

I am running Mopidy 2.2.1 and just enabled Soundcloud (installed with apt-get on Raspbian Stretch).

This is the config snippet:

[soundcloud]
enabled = true
explore_songs = 25
auth_token = ********

These are the errors in the log:

Feb 18 17:58:20 pab mopidy[5054]: ERROR    SoundCloudBackend backend caused an exception.
Feb 18 17:58:20 pab mopidy[5054]: Traceback (most recent call last):
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/mopidy/core/library.py", 
line 19, in _backend_error_handling
Feb 18 17:58:20 pab mopidy[5054]:     yield
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/mopidy/core/library.py", 
line 112, in _browse
Feb 18 17:58:20 pab mopidy[5054]:     result = backend.library.browse(uri).get()
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/pykka/threading.py", line
 52, in get
Feb 18 17:58:20 pab mopidy[5054]:     compat.reraise(*self._data['exc_info'])
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/pykka/compat.py", line 12, in reraise
Feb 18 17:58:20 pab mopidy[5054]:     exec('raise tp, value, tb')
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 201, in _actor_loop
Feb 18 17:58:20 pab mopidy[5054]:     response = self._handle_receive(message)
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 295, in _handle_receive
Feb 18 17:58:20 pab mopidy[5054]:     return callee(*message['args'], **message['kwargs'])
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/mopidy_soundcloud/library.py", line 155, in browse
Feb 18 17:58:20 pab mopidy[5054]:     return self.list_explore()
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/mopidy_soundcloud/library.py", line 97, in list_explore
Feb 18 17:58:20 pab mopidy[5054]:     for eid, name in enumerate(self.backend.remote.get_explore()):
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/mopidy_soundcloud/soundcloud.py", line 116, in get_explore
Feb 18 17:58:20 pab mopidy[5054]:     explore = self.get_explore_categories()
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/mopidy_soundcloud/soundcloud.py", line 57, in _memoized
Feb 18 17:58:20 pab mopidy[5054]:     value = self.func(*args)
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/mopidy_soundcloud/soundcloud.py", line 113, in get_explore_categories
Feb 18 17:58:20 pab mopidy[5054]:     return self._get('explore/categories', 'api-v2').get('music')
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/mopidy_soundcloud/soundcloud.py", line 235, in _get
Feb 18 17:58:20 pab mopidy[5054]:     res.raise_for_status()
Feb 18 17:58:20 pab mopidy[5054]:   File "/usr/lib/python2.7/dist-packages/requests/models.py", line 893, in raise_for_status
Feb 18 17:58:20 pab mopidy[5054]:     raise HTTPError(http_error_msg, response=self)
Feb 18 17:58:20 pab mopidy[5054]: HTTPError: 404 Client Error: Not Found for url: https://api-v2.soundcloud.com/explore/categories?client_id=93e33e327fd8a9b77becd179652272e2

What am I missing? I have restarted mopidy after Soundcloud installation.


#2

It appears the version of Mopidy-Soundcloud available from APT is outdated. The latest version of Mopidy-Soundcloud (on Github and available from PyPI) is v2.1.0 but you probably have an old version. If you run mopidy deps you can check what version you are using. Hopefully we can get the version on APT updated.

The latest version fixes a load of issues including better error handling. The error that isn’t being handled for you is probably our Soundcloud account quota being used up today. Either from someone re-using our API key or someone’s client going nuts and spamming the endpoint. Unfortunately there’s not much we can do about that, it’s just how the Soundcloud API works. I guess we could try to enforce request limits in Mopidy-Soundcloud, that might help.


#3

This is the version
Mopidy-SoundCloud: 2.0.2 from /usr/lib/python2.7/dist-packages


#4

I have installed latest version from pip. Now I don’t have those errors anymore but there is nothing playing. Search function does work, but tracks are not playable.

Feb 18 18:50:47 pab mopidy[5464]: INFO     Searching SoundCloud for: buena vista
Feb 18 18:50:47 pab mopidy[5464]: INFO     'Buena Vista Social Club - El Carretero (At Carnegie Hall)' can't be streamed from SoundCloud
Feb 18 18:50:56 pab mopidy[5464]: WARNING  SoundCloud daily rate limit exceeded
Feb 18 18:50:56 pab mopidy[5464]: INFO     'Buena Vista Social Club - Chan Chan, from Buena Vista Social Club (1997)' can't be streamed from SoundCloud
Feb 18 18:50:56 pab mopidy[5464]: WARNING  Track is not playable: soundcloud:song/Buena Vista Social Club - Chan Chan from Buena Vista Social Club (1997).131717642
Feb 18 18:50:59 pab mopidy[5464]: WARNING  Track is not playable: soundcloud:song/Buena Vista Social Club - Chan Chan from Buena Vista Social Club (1997).131717642
Feb 18 18:50:59 pab mopidy[5464]: WARNING  Track is not playable: soundcloud:song/Buena Vista Social Club - Chan Chan from Buena Vista Social Club (1997).131717642

I think I will remove it.


#5

Yeh, because:

SoundCloud daily rate limit exceeded


#6

Latest version is now available from apt.mopidy.com.


#7

Yes, but it doesn’t work either.


#8

It’s a new day and the quota has been reset. I’m using it literally right now to play ‘Tall Ships - Words Are Pegs Upon Which We Hang Ideas (MTBRD Remix)’. Note that Soundcloud don’t allow streaming of everything. I don’t know what their rules are. But the errors in your log should differentiate between unstreamable tracks and hitting the daily rate-limit. If you want to provide a (full) debug log we can try to understand your issue.


#9

Ok, I am reinstalling…


#10

Yes, I confirm it is working. Not for every track, a little bit weird, but it is working.
Thanks