Help wanted -- debugging / porting mopidy-audioaddict to mopidy 2.1.0


Hello all,

First, a disclaimer: While quite versed in Raspian (and, to a lesser degree, Python …) I’m new to mopidy and its extensions.

My problem:

I’ve successfully set up from Raspbian (stretch) with gstreamer1.0 + plugins (both …good and …ugly), and mopidy:

root@media3:~# pip list  | grep -i mopidy
Mopidy (2.1.0)
Mopidy-ALSAMixer (1.1.0)
Mopidy-AudioAddict (0.3.1)
Mopidy-Iris (3.13.1)
Mopidy-Local-Images (1.0.0)
Mopidy-Scrobbler (1.1.1)
Mopidy-Spotify (3.1.0)
Mopidy-Spotify-Web (0.3.0)

Everything works as expected – local files, spotify, spotify-web, etc – exceptt the one extension I really need: Namely “mopidy-audioaddict” – as fetched from "nilicule/mopidy-audioaddict " GitHub repo and installed via “pip”.

I need that extension for listening to “jazzradio” . When trying to tune into a channel from “” that extension issue the following error:

  File "/usr/local/lib/python2.7/dist-packages/mopidy_audioaddict/", line 161, in _unwrap_stream
scan_result.mime.startswith('text/') or
  AttributeError: 'NoneType' object has no attribute 'startswith' 
  WARNING  2018-02-23 13:46:35,442 [1956:Core-12] mopidy.core.tracklist
  Track is not playable: audioaddict:channel:86

The whole stack trace and the “/etc/mopidy/mopdiy.conf” configuration (the mopidy-audioaddict section) is uploaded here:

I’ve tested that very same configuration for “mopidy-audioaddict” on “pi-musicbox 0.7r5” (which packs older versions of mopidy and gstreamer) and it works just fine there.

So what that tells me is that there is some incompatible change from the (old) mopidy in “pi-musicbox” (0.7r5) and latest mopidy that I have (namely “2.1.0”), and that change breaks this “mopidy-audioaddict” extension.

To make matters worse, it seems that this extension is abandoned code – last submit on the “mopidy-audioaddict” GitHub is from 3 years ago.

So, my ask is: I would need the help of the fine mopidy people here to debug the error / fix the code.

In no particular order:

  • Can any mopidy expert take a look at that error and point out how the code needs to be updated to work with latest mopidy (considering the changes from mopidy 1.0 to 2.1.0).

  • Lacking that, does anyone has some guidance into:

  • How to set up an mopidy extension development environment to fix this ? Tools that I need ? How do I set a local capture that stream to see what do I need to fix ? How do I use that in a development environment ?
  • Is there a “dummy” extension that I can use as a boiler plate to “get inspired” and see how a working code should look like ? Some other radio stream extension that is known to work and can be adapted for “audioaddict” / jazzradio ?

Any guidance or help would be appreciated.




First thing, I have to say, please don’t run Mopidy as root. There are very few cases where this is necessary (pimusicbox does this WRONG).

Development environment info can be found at

Have you checked that your radio station is not available through TuneIn?

Running with verbose logging -v should show you what’s going on. This looks like a problem in the Scanner rather than the extension.


Thanks for the feedback.

( First, an OT side-note: I’m running mopidy as root since this is still WIP. pi-musicbox does not actually run mopidy as root – at least version v0.7r5. Just FYI… )

In the mean time I started googling a bit for the error / trying to make sense of it, and discovered that “modipy-tunein” is almost identical code with “mopidy-audioaddict”.

Not sure who copied it from who (irrelevant, really…), but it seems that “mopidy-tunein” does indeed has a fix for this issue.

(But no, is not available through TuneIn, ironically enough…)

As such I tested the fix in “mopidy-tunein”, and retrofitted to “mopidy-audioaddict” and got it working :smile:

Since the original repo seems abandoned didn’t make sense to issue a PR against the original code. As such I forked the original “mopdiy-audioaddict” repo & replicated the fix in my fork. As a result, a version of “modipy-audioaddict” that is working with latest modipy (2.1.0 at the moment) can be found here:

If anyone better equipped / interested to maintain this further, please feel free to carry the torch – I don’t have neither the skills nor the time to give this proper justice.

Thanks for the help,



The code is copied from Mopidy itself, I think there’s a comment saying that in mopidy-tunein. Glad it’s working.