Closed cbomgit closed 9 years ago
ERROR Uncaught exception Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 272, in run backends = self.start_backends(config, backend_classes, audio) File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 343, in start_backends config=config, audio=audio).proxy() File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 93, in start obj = cls(_args, *_kwargs) File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/actor.py", line 32, in init self.playlists = SubsonicPlaylistsProvider(backend=self) File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/playlist.py", line 15, in init self.playlists = self._get_playlists() File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/playlist.py", line 36, in _get_playlists playlists = self.remote.get_user_playlists() File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/client.py", line 360, in get_user_playlists for playlist in results] AttributeError: 'NoneType' object has no attribute 'get'
I am having this issue as well on my pi music box:
2015-04-01 01:50:08,285 - INFO Connecting to Subsonic library http://example.subsonic.net:4040 as user ExampleUser
2015-04-01 01:50:08,344 - ERROR Uncaught exception
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 272, in run
backends = self.start_backends(config, backend_classes, audio)
File "/usr/local/lib/python2.7/dist-packages/mopidy/commands.py", line 343, in start_backends
config=config, audio=audio).proxy()
File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 93, in start
obj = cls(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/actor.py", line 32, in init
self.playlists = SubsonicPlaylistsProvider(backend=self)
File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/playlist.py", line 15, in init
self.playlists = self._get_playlists()
File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/playlist.py", line 36, in _get_playlists
playlists = self.remote.get_user_playlists()
File "/usr/local/lib/python2.7/dist-packages/mopidy_subsonic/client.py", line 360, in get_user_playlists
for playlist in results]
AttributeError: 'NoneType' object has no attribute 'get'
2015-04-01 01:50:08,350 - INFO Stopping Mopidy frontends
2015-04-01 01:50:08,351 - INFO Stopping Mopidy core
2015-04-01 01:50:08,352 - INFO Stopping Mopidy backends
Anyone able to work around this problem? I'd love to be able to use my Subsonic service with Mopidy :+1:
Sorry. I haven't been using Subsonic recently, so it may take a day or two to set up the testing environment again. I'm planning on working on this tomorrow.
If you need a solution right now, just make 1 playlist via the normal subsonic web interface.
Got it working in https://github.com/hhm0/mopidy-subsonic/tree/playnonefix; however, this only makes mopidy
stop erroring, while the error might be a symptom of a larger problem. I would want to fix the bigger problem, if there is one, instead of just patching over the error, before submitting a pull request.
Perhaps #1 is connected to this.
Found this problem on Arch Linux x64, python2-pysonic 0.2.2-1, and mopidy-subsonic 0.3.1-1.
The problem code is here:
If the subsonic server returns a dict with an empty 'playlists' key, the check at the beginning of the function will still fail. It should instead check for an empty list with 'if not results':
Thanks!