Extension fails to load silently
Hi
I installed mopidy-audioaddict via pip, mopidy via apt, on Debian Stretch.
The extension looked like it was properly configured (appeared in the mopidy config) but I I just couldn't see any of the audioaddict streams in my MPD clients.
Are they supposed to show up under streams? Be found by a search? Simply show up in the browse section? The README didn't say… (they're a type a file you can browse, for anyone else stuck on this)
Looking into the logs, I see this relevant bit:
Jan 11 02:24:37 computer mopidy[20596]: INFO Starting Mopidy backends: BeetsBackend, AudioAddictBackend, StreamBackend, M3UBackend
Jan 11 02:24:37 computer mopidy[20596]: INFO AudioAddict: authenticating with API
Jan 11 02:24:38 computer mopidy[20596]: ERROR Got un-handled exception from AudioAddictBackend
Jan 11 02:24:38 computer mopidy[20596]: Traceback (most recent call last):
Jan 11 02:24:38 computer mopidy[20596]: File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 237, in _actor_error_handli
Jan 11 02:24:38 computer mopidy[20596]: yield
Jan 11 02:24:38 computer mopidy[20596]: File "/usr/lib/python2.7/dist-packages/mopidy/commands.py", line 385, in start_backends
Jan 11 02:24:38 computer mopidy[20596]: config=config, audio=audio).proxy()
Jan 11 02:24:38 computer mopidy[20596]: File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 94, in start
Jan 11 02:24:38 computer mopidy[20596]: obj = cls(*args, **kwargs)
Jan 11 02:24:38 computer mopidy[20596]: File "/usr/local/lib/python2.7/dist-packages/mopidy_audioaddict/actor.py", line 55, in __ini
Jan 11 02:24:38 computer mopidy[20596]: proxy=full_proxy
Jan 11 02:24:38 computer mopidy[20596]: File "/usr/local/lib/python2.7/dist-packages/mopidy_audioaddict/client.py", line 37, in __in
Jan 11 02:24:38 computer mopidy[20596]: self._api_key, self._has_premium = self._fetchApiKey(self._username, self._password)
Jan 11 02:24:38 computer mopidy[20596]: File "/usr/local/lib/python2.7/dist-packages/mopidy_audioaddict/client.py", line 134, in _fe
Jan 11 02:24:38 computer mopidy[20596]: json_object_raw = r.json()
Jan 11 02:24:38 computer mopidy[20596]: File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 841, in json
Jan 11 02:24:38 computer mopidy[20596]: return complexjson.loads(self.text, **kwargs)
Jan 11 02:24:38 computer mopidy[20596]: File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 516, in loads
Jan 11 02:24:38 computer mopidy[20596]: return _default_decoder.decode(s)
Jan 11 02:24:38 computer mopidy[20596]: File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 374, in decode
Jan 11 02:24:38 computer mopidy[20596]: obj, end = self.raw_decode(s)
Jan 11 02:24:38 computer mopidy[20596]: File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 404, in raw_decode
Jan 11 02:24:38 computer mopidy[20596]: return self.scan_once(s, idx=_w(s, idx).end())
Jan 11 02:24:38 computer mopidy[20596]: JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I was convinced my login/password were right, but of course, they weren't. Once I corrected this, the streams showed up in my clients under browse.
This long text to suggest maybe making a wrong login/password combination (something bound to happen often) a bit more visible, because right now, the extension barely lets you know this is happening.
Thanks in any case for a cool extension!