Mopidy-Stream error : StreamBackend backend caused an exception


#1

Hi

I have setup mopidy on a raspberry 3 and it works fine with my local library (most of the time). Yet, I cannot play radio streams with the Mopidy-Stream extension.
When I type the URL in any frontend (RompR, musicbox_webclient), it just does not play (example: https://www.static.rtbf.be/radio/vivacite/m3u/vivabxl-mp3.pls )
and the following errors appears:

mopidy.log

2017-10-11 22:57:33,278 ERROR [824:Core-7] mopidy.core.library: StreamBackend backend caused an exception.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mopidy/core/library.py", line 19, in _backend_error_handling
    yield
  File "/usr/lib/python2.7/dist-packages/mopidy/core/library.py", line 236, in lookup
    result = future.get()
  File "/usr/lib/python2.7/dist-packages/pykka/threading.py", line 52, in get
    compat.reraise(*self._data['exc_info'])
  File "/usr/lib/python2.7/dist-packages/pykka/compat.py", line 12, in reraise
    exec('raise tp, value, tb')
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 201, in _actor_loop
    response = self._handle_receive(message)    response = self._handle_receive(message)                                                                                            [0/172]
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 295, in _handle_receive
    return callee(*message['args'], **message['kwargs'])
  File "/usr/lib/python2.7/dist-packages/mopidy/stream/actor.py", line 69, in lookup
    uri=uri, length=scan_result.duration)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/immutable.py", line 223, in replace
    other = super(ValidatedImmutableObject, self).replace(**kwargs)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/immutable.py", line 120, in replace
    other._set_field(key, value)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/immutable.py", line 195, in _set_field
    object.__setattr__(self, name, value)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/fields.py", line 50, in __set__
    value = self.validate(value)
  File "/usr/lib/python2.7/dist-packages/mopidy/models/fields.py", line 134, in validate
    (self._name, self._min, value))
ValueError: Expected length to be at least 0, not -1

Any idea what can be wrong? Thanks

I paste below the mopidy.conf and the output of the “mopidy deps” command

mopidy.conf ([stream] section as suggested in the documentation)

[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy

[logging]
config_file = /etc/mopidy/logging.conf
debug_file = /var/log/mopidy/mopidy-debug.log

[mpd]
enabled = true
hostname = ::
port = 6600
password = test 
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist = 
  listall
  listallinfo
default_playlist_scheme = m3u

[local]
media_dir = /media/music
enabled = true
library = sqlite
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions =
  .directory
  .html
  .jpeg
  .jpg
... (truncated)

[m3u]
playlists_dir = /var/lib/mopidy/playlists

[http]
enabled = true
hostname = ::
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[stream]
enabled = true
protocols =
    http
    https
    mms
    rtmp
    rtmps
    rtsp
timeout = 5000
metadata_blacklist =

[file]
enabled = true
media_dirs = 
  /media/music
excluded_file_extensions = 
  .jpg
  .jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local-sqlite]
enabled = true
directories =
    Albums                  local:directory?type=album
    Artists                 local:directory?type=artist
    Composers               local:directory?type=artist&role=composer
    Genres                  local:directory?type=genre
    Performers              local:directory?type=artist&role=performer
    Release Years           local:directory?type=date&format=%25Y
    Tracks                  local:directory?type=track
    Last Week's Updates     local:directory?max-age=604800
    Last Month's Updates    local:directory?max-age=2592000
timeout = 10
use_album_mbid_uri = true
use_artist_mbid_uri = false
use_artist_sortname = true

[tunein]
timeout = 5000

[audio]
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/snapfifo

mopidy deps (command output)

Executable: /usr/bin/mopidy
Platform: Linux-4.9.35-v7+-armv7l-with-debian-8.0
Python: CPython 2.7.9 from /usr/lib/python2.7
Mopidy: 2.1.0 from /usr/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  requests>=2.0: 2.18.1 from /usr/local/lib/python2.7/dist-packages
    certifi>=2017.4.17: 2017.4.17 from /usr/local/lib/python2.7/dist-packages
    chardet<3.1.0,>=3.0.2: 3.0.4 from /usr/local/lib/python2.7/dist-packages
    urllib3<1.22,>=1.21.1: 1.21.1 from /usr/local/lib/python2.7/dist-packages
    idna<2.6,>=2.5: 2.5 from /usr/local/lib/python2.7/dist-packages
  tornado>=3.2: 4.5.1 from /usr/local/lib/python2.7/dist-packages
    singledispatch: 3.4.0.3 from /usr/local/lib/python2.7/dist-packages
      six: 1.10.0 from /usr/local/lib/python2.7/dist-packages
    certifi: 2017.4.17 from /usr/local/lib/python2.7/dist-packages
    backports_abc>=0.4: 0.5 from /usr/local/lib/python2.7/dist-packages
Mopidy-MusicBox-Webclient: 2.4.0 from /usr/local/lib/python2.7/dist-packages
  Mopidy>=1.1.0: 2.1.0 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.18.1 from /usr/local/lib/python2.7/dist-packages
      certifi>=2017.4.17: 2017.4.17 from /usr/local/lib/python2.7/dist-packages
      chardet<3.1.0,>=3.0.2: 3.0.4 from /usr/local/lib/python2.7/dist-packages
      urllib3<1.22,>=1.21.1: 1.21.1 from /usr/local/lib/python2.7/dist-packages
      idna<2.6,>=2.5: 2.5 from /usr/local/lib/python2.7/dist-packages
    tornado>=3.2: 4.5.1 from /usr/local/lib/python2.7/dist-packages
      singledispatch: 3.4.0.3 from /usr/local/lib/python2.7/dist-packages
        six: 1.10.0 from /usr/local/lib/python2.7/dist-packages
      certifi: 2017.4.17 from /usr/local/lib/python2.7/dist-packages
      backports_abc>=0.4: 0.5 from /usr/local/lib/python2.7/dist-packages
  setuptools: 36.2.0 from /usr/local/lib/python2.7/dist-packages
Mopidy-Moped: 0.7.1 from /usr/local/lib/python2.7/dist-packages
  setuptools: 36.2.0 from /usr/local/lib/python2.7/dist-packages
  Mopidy>=1.0.0: 2.1.0 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.18.1 from /usr/local/lib/python2.7/dist-packages
      certifi>=2017.4.17: 2017.4.17 from /usr/local/lib/python2.7/dist-packages
      chardet<3.1.0,>=3.0.2: 3.0.4 from /usr/local/lib/python2.7/dist-packages
      urllib3<1.22,>=1.21.1: 1.21.1 from /usr/local/lib/python2.7/dist-packages
      idna<2.6,>=2.5: 2.5 from /usr/local/lib/python2.7/dist-packages
    tornado>=3.2: 4.5.1 from /usr/local/lib/python2.7/dist-packages
      singledispatch: 3.4.0.3 from /usr/local/lib/python2.7/dist-packages
        six: 1.10.0 from /usr/local/lib/python2.7/dist-packages
      certifi: 2017.4.17 from /usr/local/lib/python2.7/dist-packages
      backports_abc>=0.4: 0.5 from /usr/local/lib/python2.7/dist-packages
Mopidy-Local-SQLite: 1.0.0 from /usr/lib/python2.7/dist-packages
  Mopidy>=1.1: 2.1.0 from /usr/lib/python2.7/dist-packages
    Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
    requests>=2.0: 2.18.1 from /usr/local/lib/python2.7/dist-packages
      certifi>=2017.4.17: 2017.4.17 from /usr/local/lib/python2.7/dist-packages
      chardet<3.1.0,>=3.0.2: 3.0.4 from /usr/local/lib/python2.7/dist-packages
      urllib3<1.22,>=1.21.1: 1.21.1 from /usr/local/lib/python2.7/dist-packages
      idna<2.6,>=2.5: 2.5 from /usr/local/lib/python2.7/dist-packages
    tornado>=3.2: 4.5.1 from /usr/local/lib/python2.7/dist-packages
      singledispatch: 3.4.0.3 from /usr/local/lib/python2.7/dist-packages
        six: 1.10.0 from /usr/local/lib/python2.7/dist-packages
      certifi: 2017.4.17 from /usr/local/lib/python2.7/dist-packages
      backports_abc>=0.4: 0.5 from /usr/local/lib/python2.7/dist-packages
  Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
  uritools>=1.0: 1.0.1 from /usr/lib/python2.7/dist-packages
    ipaddress>=1.0.6: 1.0.14 from /usr/lib/python2.7/dist-packages
    ipaddress>=1.0.6: 1.0.14 from /usr/lib/python2.7/dist-packages
GStreamer: 1.4.4.0 from /usr/lib/python2.7/dist-packages/gi
  Detailed information: 
    Python wrapper: python-gi 3.14.0
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        pulsesink
        flump3dec
        id3demux
        id3v2mux
        lamemp3enc
        mad
        mpegaudioparse
        mpg123audiodec
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
        shout2send
      Not found:
        none