Mopidy on Debian Pogolug: startup fails with UnicodeDecodeError [SOLVED]


#1

I just installed Mopidy on a Pogoplug with a fresh install of Debian. MPD playback works fine, but mopidy fails to start complaining:

File "/usr/lib/python2.7/dist-packages/mopidy/config/__init__.py", line 101, in format_initial
    return description + '\n\n' + _format(config, {}, schemas, False, True)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1222: ordinal not in range(128)

mopidy deps and mopidy config both return the same error message.


#2

The issue seems to be that we’re concatenating three strings, where at least a couple of them is unicode strings and one is an UTF-8 encoded bytestring (ref the 0xc3 byte, which is the first of two bytes of a single character encoded in UTF-8).

As there’s multiple strings being concatenated here, I’m not sure which one is a bytestring.

Can you modify /usr/lib/python2.7/dist-packages/mopidy/config/__init__.py and add a line before line 101 (with return description...) where it currently fails:

assert False, repr(dict(desc=description, formatted_config=_format(config, {}, schemas, False, True)), config=config, schemas=schemas))

If you now run e.g. mopidy deps again and share the output here, we should be able to debug and fix this properly.


#3

I’m pretty sure I put the line in there properly, but it gave me a Syntax Error,

File "/usr/lib/python2.7/dist-packages/mopidy/config/__init__.py", line 101
    assert False, repr(dict(desc=description, formatted_config=_format(config, {}, schemas, False, True)), config=config, schemas=schemas))
                                                                                                                                          ^
SyntaxError: invalid syntax

#4

Another try:

assert False, repr(dict(desc=description, formatted_config=_format(config, {}, schemas, False, True), config=config, schemas=schemas))

#5

I tried various ways of formatting it, but it always returns:

from mopidy import config as config_lib, exceptions
  File "/usr/lib/python2.7/dist-packages/mopidy/config/__init__.py", line 102
    return description + '\n\n' + _format(config, {}, schemas, False, True)
    ^
IndentationError: unexpected indent

#6

Just put it all on a single line.


#7

I was editing it with notepad+, but I switched to nano and it produced this mighty block of text

Traceback (most recent call last):
  File "/usr/bin/mopidy", line 9, in <module>
    load_entry_point('Mopidy==0.19.4', 'console_scripts', 'mopidy')()
  File "/usr/local/lib/python2.7/dist-packages/mopidy/__main__.py", line 64, in main
    create_file_structures_and_config(args, installed_extensions)
  File "/usr/local/lib/python2.7/dist-packages/mopidy/__main__.py", line 149, in create_file_structures_and_config
    default = config_lib.format_initial(extensions)
  File "/usr/local/lib/python2.7/dist-packages/mopidy/config/__init__.py", line 101, in format_initial
    assert False, repr(dict(desc=description, formatted_config=_format(config, {}, schemas, False, True), config=config, schemas=schemas))
AssertionError: {'formatted_config': '[logging]\n#color = true\n#console_format = %(levelname)-8s %(message)s\n#debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\\n  %(message)s\n#debug_file = mopidy.log\n#config_file =\n\n[audio]\n#mixer = software\n#mixer_volume = \n#output = autoaudiosink\n#visualizer = \n\n[proxy]\n#scheme = \n#hostname = \n#port = \n#username = \n#password = \n\n[soundcloud]\n#enabled = true\n#explore_songs = 25\n#auth_token = \n\n[http]\n#enabled = true\n#hostname = 127.0.0.1\n#port = 6680\n#static_dir =\n#zeroconf = Mopidy HTTP server on $hostname\n\n[mpd]\n#enabled = true\n#hostname = 127.0.0.1\n#port = 6600\n#password = \n#max_connections = 20\n#connection_timeout = 60\n#zeroconf = Mopidy MPD server on $hostname\n\n[softwaremixer]\n#enabled = true\n\n[local]\n#enabled = true\n#library = json\n#media_dir =\n#data_dir = $XDG_DATA_DIR/mopidy/local\n#playlists_dir = $XDG_DATA_DIR/mopidy/local/playlists\n#scan_timeout = 1000\n#scan_flush_threshold = 1000\n#excluded_file_extensions = \n#  .directory\n#  .html\n#  .jpeg\n#  .jpg\n#  .log\n#  .nfo\n#  .png\n#  .txt\n\n[stream]\n#enabled = true\n#protocols = \n#  file\n#  http\n#  https\n#  mms\n#  rtmp\n#  rtmps\n#  rtsp\n#metadata_blacklist = \n#timeout = 5000\n\n[websettings]\n#enabled = true\n#musicbox = false\n#config_file = /etc/mopidy/mopidy.conf\n\n[http-kuechenradio]\n#enabled = true\n#title = Mopidy K\xc3\xbcchenradio\n#default_locale = en\n\n[gmusic]\n#enabled = true\n#username = \n#password = \n#deviceid = \n\n[podcast]\n#enabled = true\n#browse_limit = 100\n#search_limit = 20\n#search_details = false\n#update_interval = 86400\n#feeds = \n#feeds_root_name = Subscribed Feeds\n#feeds_cache_size = 32\n#feeds_cache_ttl = 3600\n#feeds_timeout = 10\n\n[tunein]\n#enabled = true\n#timeout = 5000\n\n[somafm]\n#enabled = true\n#encoding = mp3\n#quality = fast\n\n[subsonic]\n#enabled = true\n#hostname = \n#port = \n#username = \n#password = \n#ssl = false\n\n[youtube]\n#enabled = true', 'schemas': [ConfigSchema([(u'color', <mopidy.config.types.Boolean object at 0xb6c858b0>), (u'console_format', <mopidy.config.types.String object at 0x17083f0>), (u'debug_format', <mopidy.config.types.String object at 0x1708d10>), (u'debug_file', <mopidy.config.types.Path object at 0x1708d30>), (u'config_file', <mopidy.config.types.Path object at 0x1708d50>)]), <mopidy.config.schemas.LogLevelConfigSchema object at 0x1708d70>, ConfigSchema([(u'mixer', <mopidy.config.types.String object at 0x1708db0>), (u'mixer_track', <mopidy.config.types.Deprecated object at 0x1708dd0>), (u'mixer_volume', <mopidy.config.types.Integer object at 0x1708df0>), (u'output', <mopidy.config.types.String object at 0x1708e10>), (u'visualizer', <mopidy.config.types.String object at 0x1708e30>)]), ConfigSchema([(u'scheme', <mopidy.config.types.String object at 0x1708e50>), (u'hostname', <mopidy.config.types.Hostname object at 0x1708e70>), (u'port', <mopidy.config.types.Port object at 0x1708e90>), (u'username', <mopidy.config.types.String object at 0x1708eb0>), (u'password', <mopidy.config.types.Secret object at 0x1708ed0>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1ba68d0>), (u'explore_songs', <mopidy.config.types.Integer object at 0x1ba6a50>), (u'auth_token', <mopidy.config.types.Secret object at 0x1ba6bd0>), (u'explore', <mopidy.config.types.Deprecated object at 0x1ba6bf0>), (u'explore_pages', <mopidy.config.types.Deprecated object at 0x1ba6c10>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1ba6c30>), (u'hostname', <mopidy.config.types.Hostname object at 0x1ba6c50>), (u'port', <mopidy.config.types.Port object at 0x1ba6c70>), (u'static_dir', <mopidy.config.types.Path object at 0x1ba6c90>), (u'zeroconf', <mopidy.config.types.String object at 0x1ba6cb0>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1ba6cd0>), (u'hostname', <mopidy.config.types.Hostname object at 0x1ba6cf0>), (u'port', <mopidy.config.types.Port object at 0x1ba6d10>), (u'password', <mopidy.config.types.Secret object at 0x1ba6d30>), (u'max_connections', <mopidy.config.types.Integer object at 0x1ba6d50>), (u'connection_timeout', <mopidy.config.types.Integer object at 0x1ba6d70>), (u'zeroconf', <mopidy.config.types.String object at 0x1ba6d90>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1ba6db0>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1ba6dd0>), (u'library', <mopidy.config.types.String object at 0x1ba6df0>), (u'media_dir', <mopidy.config.types.Path object at 0x1ba6e10>), (u'data_dir', <mopidy.config.types.Path object at 0x1ba6e30>), (u'playlists_dir', <mopidy.config.types.Path object at 0x1ba6e50>), (u'tag_cache_file', <mopidy.config.types.Deprecated object at 0x1ba6e70>), (u'scan_timeout', <mopidy.config.types.Integer object at 0x1ba6e90>), (u'scan_flush_threshold', <mopidy.config.types.Integer object at 0x1ba6eb0>), (u'excluded_file_extensions', <mopidy.config.types.List object at 0x1ba6ed0>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1ba6ef0>), (u'protocols', <mopidy.config.types.List object at 0x1ba6f10>), (u'metadata_blacklist', <mopidy.config.types.List object at 0x1ba6f30>), (u'timeout', <mopidy.config.types.Integer object at 0x1ba6f50>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1ba6f70>), (u'musicbox', <mopidy.config.types.String object at 0x1ba6f90>), (u'config_file', <mopidy.config.types.String object at 0x1ba6fb0>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1ba6fd0>), (u'title', <mopidy.config.types.String object at 0x1ba6ff0>), (u'default_locale', <mopidy.config.types.String object at 0x1bab030>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1bab050>), (u'username', <mopidy.config.types.String object at 0x1bab070>), (u'password', <mopidy.config.types.Secret object at 0x1bab090>), (u'deviceid', <mopidy.config.types.String object at 0x1bab0b0>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1bab0d0>), (u'browse_limit', <mopidy.config.types.Integer object at 0x1bab0f0>), (u'search_limit', <mopidy.config.types.Integer object at 0x1bab110>), (u'search_details', <mopidy.config.types.Boolean object at 0x1bab130>), (u'update_interval', <mopidy.config.types.Integer object at 0x1bab150>), (u'feeds', <mopidy.config.types.List object at 0x1bab170>), (u'feeds_root_name', <mopidy.config.types.String object at 0x1bab190>), (u'feeds_cache_size', <mopidy.config.types.Integer object at 0x1bab1b0>), (u'feeds_cache_ttl', <mopidy.config.types.Integer object at 0x1bab1d0>), (u'feeds_timeout', <mopidy.config.types.Integer object at 0x1bab1f0>), (u'root_name', <mopidy.config.types.Deprecated object at 0x1bab210>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1bab230>), (u'timeout', <mopidy.config.types.Integer object at 0x1bab250>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1bab270>), (u'encoding', <mopidy.config.types.String object at 0x1bab290>), (u'quality', <mopidy.config.types.String object at 0x1bab2b0>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1bab2d0>), (u'hostname', <mopidy.config.types.Hostname object at 0x1bab2f0>), (u'port', <mopidy.config.types.Port object at 0x1bab310>), (u'username', <mopidy.config.types.String object at 0x1bab330>), (u'password', <mopidy.config.types.Secret object at 0x1bab350>), (u'ssl', <mopidy.config.types.Boolean object at 0x1bab370>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x1bab390>)])], 'config': {u'mpd': {'hostname': '127.0.0.1', 'enabled': True, 'zeroconf': u'Mopidy MPD server on $hostname', 'connection_timeout': 60, 'password': None, 'port': 6600, 'max_connections': 20}, u'podcast': {'feeds_cache_size': 32, 'browse_limit': 100, 'enabled': True, 'feeds_cache_ttl': 3600, 'feeds_root_name': u'Subscribed Feeds', 'search_limit': 20, 'search_details': False, 'feeds_timeout': 10, 'update_interval': 86400, 'feeds': ()}, u'http': {'zeroconf': u'Mopidy HTTP server on $hostname', 'enabled': True, 'hostname': '127.0.0.1', 'static_dir': None, 'port': 6680}, u'stream': {'enabled': True, 'protocols': (u'file', u'http', u'https', u'mms', u'rtmp', u'rtmps', u'rtsp'), 'timeout': 5000, 'metadata_blacklist': ()}, u'subsonic': {'username': None, 'hostname': None, 'enabled': True, 'ssl': None, 'password': None, 'port': None}, u'gmusic': {'username': None, 'password': None, 'enabled': True, 'deviceid': None}, u'youtube': {'enabled': True}, u'somafm': {'enabled': True, 'quality': u'fast', 'encoding': u'mp3'}, u'http-kuechenradio': {'enabled': True, 'default_locale': u'en', 'title': u'Mopidy K\xfcchenradio'}, u'softwaremixer': {'enabled': True}, u'proxy': {'username': None, 'scheme': None, 'password': None, 'hostname': None, 'port': None}, u'logging': {'color': True, 'debug_file': '/root/mopidy.log', 'config_file': None, 'console_format': u'%(levelname)-8s %(message)s', 'debug_format': u'%(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n  %(message)s'}, u'websettings': {'config_file': u'/etc/mopidy/mopidy.conf', 'musicbox': u'false', 'enabled': True}, u'audio': {'mixer_volume': None, 'output': u'autoaudiosink', 'mixer': u'software', 'visualizer': None}, u'local': {'excluded_file_extensions': (u'.directory', u'.html', u'.jpeg', u'.jpg', u'.log', u'.nfo', u'.png', u'.txt'), 'data_dir': '/root/.local/share/mopidy/local', 'scan_flush_threshold': 1000, 'scan_timeout': 1000, 'enabled': True, 'library': u'json', 'playlists_dir': '/root/.local/share/mopidy/local/playlists', 'media_dir': None}, u'tunein': {'enabled': True, 'timeout': 5000}, u'soundcloud': {'auth_token': None, 'enabled': True, 'explore_songs': 25}}, 'desc': u'# For further information about options in this file see:\n#   http://docs.mopidy.com/\n#\n# The initial commented out values reflect the defaults as of:\n#   Mopidy 0.19.4\n#   Mopidy-GMusic 0.3.0\n#   Mopidy-HTTP 0.19.4\n#   Mopidy-HTTP-Kuechenradio 0.4.2\n#   Mopidy-Local 0.19.4\n#   Mopidy-MPD 0.19.4\n#   Mopidy-Podcast 1.1.0\n#   Mopidy-SoftwareMixer 0.19.4\n#   Mopidy-SomaFM 0.7.0\n#   Mopidy-SoundCloud 1.2.5\n#   Mopidy-Stream 0.19.4\n#   Mopidy-Subsonic 0.3.1\n#   Mopidy-TuneIn 0.1.2\n#   Mopidy-WebSettings 0.1.4.1\n#   Mopidy-Youtube 1.0.1\n#\n# Available options and defaults might have changed since then,\n# run `mopidy config` to see the current effective config and\n# `mopidy --version` to check the current version.'}

#8

Thanks, it’s running now. I’m going to start enabling extensions one by one and see what happens. I’ll count this issue as solved. Mopidy runs fine now and all of the extensions I tried work with the exception of gmusic.

Now, I got gmusic working too, by installing it with

pip install --upgrade git+https://github.com/hechtus/mopidy-gmusic.git@develop

it was missing some dependencies including backports.ssl-match-hostname.
Woo-hoo!!!


#9

I have the same issue an could nit find a solution. Also it is not possible to “modipy local scan” and no local media is listed.

The output of the modified script ist:

Traceback (most recent call last):
  File "/usr/bin/mopidy", line 9, in <module>
    load_entry_point('Mopidy==0.19.4', 'console_scripts', 'mopidy')()
  File "/usr/lib/python2.7/dist-packages/mopidy/__main__.py", line 64, in main
    create_file_structures_and_config(args, installed_extensions)
  File "/usr/lib/python2.7/dist-packages/mopidy/__main__.py", line 149, in create_file_structures_and_config
    default = config_lib.format_initial(extensions)
  File "/usr/lib/python2.7/dist-packages/mopidy/config/__init__.py", line 101, in format_initial
    assert False, repr(dict(desc=description, formatted_config=_format(config, {}, schemas, False, True), config=config, schemas=schemas))
AssertionError: {'formatted_config': '[logging]\n#color = true\n#console_format = %(levelname)-8s %(message)s\n#debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\\n  %(message)s\n#debug_file = mopidy.log\n#config_file =\n\n[audio]\n#mixer = software\n#mixer_volume = \n#output = autoaudiosink\n#visualizer = \n\n[proxy]\n#scheme = \n#hostname = \n#port = \n#username = \n#password = \n\n[spotify_tunigo]\n#enabled = true\n#region = all\n#cache_time = 3600\n\n[spotify]\n#enabled = true\n#username = \n#password = \n#bitrate = 160\n#timeout = 10\n#cache_dir = $XDG_CACHE_DIR/mopidy/spotify\n#settings_dir = $XDG_CONFIG_DIR/mopidy/spotify\n#toplist_countries = \n#  AD\n#  AR\n#  AU\n#  AT\n#  BE\n#  CO\n#  CY\n#  DK\n#  EE\n#  FI\n#  FR\n#  DE\n#  GR\n#  HK\n#  IS\n#  IE\n#  IT\n#  LV\n#  LI\n#  LT\n#  LU\n#  MY\n#  MX\n#  MC\n#  NL\n#  NZ\n#  NO\n#  PT\n#  ES\n#  SG\n#  SE\n#  CH\n#  TW\n#  TR\n#  GB\n#  US\n\n[moped]\n#enabled = true\n\n[musicbox_webclient]\n#enabled = true\n\n[simple-webclient]\n#enabled = true\n\n[http-kuechenradio]\n#enabled = true\n#title = Mopidy K\xc3\xbcchenradio\n#default_locale = en\n\n[mpris]\n#enabled = true\n#desktop_file = /usr/share/applications/mopidy.desktop\n\n[touchscreen]\n#enabled = true\n#screen_width = 320\n#screen_height = 240\n#cursor = true\n#fullscreen = false\n#cache_dir = $XDG_CACHE_DIR/mopidy/touchscreen\n\n[api_explorer]\n#enabled = true\n\n[http]\n#enabled = true\n#hostname = 127.0.0.1\n#port = 6680\n#static_dir =\n#zeroconf = Mopidy HTTP server on $hostname\n\n[mpd]\n#enabled = true\n#hostname = 127.0.0.1\n#port = 6600\n#password = \n#max_connections = 20\n#connection_timeout = 60\n#zeroconf = Mopidy MPD server on $hostname\n\n[softwaremixer]\n#enabled = true\n\n[local]\n#enabled = true\n#library = json\n#media_dir =\n#data_dir = $XDG_DATA_DIR/mopidy/local\n#playlists_dir = $XDG_DATA_DIR/mopidy/local/playlists\n#scan_timeout = 1000\n#scan_flush_threshold = 1000\n#excluded_file_extensions = \n#  .directory\n#  .html\n#  .jpeg\n#  .jpg\n#  .log\n#  .nfo\n#  .png\n#  .txt\n\n[stream]\n#enabled = true\n#protocols = \n#  file\n#  http\n#  https\n#  mms\n#  rtmp\n#  rtmps\n#  rtsp\n#metadata_blacklist = \n#timeout = 5000', 'schemas': [ConfigSchema([(u'color', <mopidy.config.types.Boolean object at 0xb6ce7870>), (u'console_format', <mopidy.config.types.String object at 0x24ad330>), (u'debug_format', <mopidy.config.types.String object at 0x24adc50>), (u'debug_file', <mopidy.config.types.Path object at 0x24adc70>), (u'config_file', <mopidy.config.types.Path object at 0x24adc90>)]), <mopidy.config.schemas.LogLevelConfigSchema object at 0x24adcb0>, ConfigSchema([(u'mixer', <mopidy.config.types.String object at 0x24adcf0>), (u'mixer_track', <mopidy.config.types.Deprecated object at 0x24add10>), (u'mixer_volume', <mopidy.config.types.Integer object at 0x24add30>), (u'output', <mopidy.config.types.String object at 0x24add50>), (u'visualizer', <mopidy.config.types.String object at 0x24add70>)]), ConfigSchema([(u'scheme', <mopidy.config.types.String object at 0x24add90>), (u'hostname', <mopidy.config.types.Hostname object at 0x24addb0>), (u'port', <mopidy.config.types.Port object at 0x24addd0>), (u'username', <mopidy.config.types.String object at 0x24addf0>), (u'password', <mopidy.config.types.Secret object at 0x24ade10>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bb4fd0>), (u'region', <mopidy.config.types.String object at 0x2bb4c30>), (u'cache_time', <mopidy.config.types.Integer object at 0x2bb4f70>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bb4f90>), (u'username', <mopidy.config.types.String object at 0x2bb4f10>), (u'password', <mopidy.config.types.Secret object at 0x2bb4f30>), (u'bitrate', <mopidy.config.types.Integer object at 0x2bb4eb0>), (u'timeout', <mopidy.config.types.Integer object at 0x2bb4ed0>), (u'cache_dir', <mopidy.config.types.Path object at 0x2bb4e50>), (u'settings_dir', <mopidy.config.types.Path object at 0x2bb4e70>), (u'toplist_countries', <mopidy.config.types.List object at 0x2bb4df0>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bb4e10>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bb4d90>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bb4db0>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bb4d50>), (u'title', <mopidy.config.types.String object at 0x2bb4cd0>), (u'default_locale', <mopidy.config.types.String object at 0x2bb4c70>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bb4c90>), (u'desktop_file', <mopidy.config.types.Path object at 0x2bb4d70>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bb4dd0>), (u'screen_width', <mopidy.config.types.Integer object at 0x2bb4e30>), (u'screen_height', <mopidy.config.types.Integer object at 0x2bb4e90>), (u'cursor', <mopidy.config.types.Boolean object at 0x2bb4ef0>), (u'fullscreen', <mopidy.config.types.Boolean object at 0x2bb4f50>), (u'cache_dir', <mopidy.config.types.Path object at 0x2bb4d10>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bb4d30>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bbf150>), (u'hostname', <mopidy.config.types.Hostname object at 0x2bbfcd0>), (u'port', <mopidy.config.types.Port object at 0x2bbfb90>), (u'static_dir', <mopidy.config.types.Path object at 0x2bbfc70>), (u'zeroconf', <mopidy.config.types.String object at 0x2bbfc90>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bbfb70>), (u'hostname', <mopidy.config.types.Hostname object at 0x2bbfbb0>), (u'port', <mopidy.config.types.Port object at 0x2bbfcb0>), (u'password', <mopidy.config.types.Secret object at 0x2bbf0b0>), (u'max_connections', <mopidy.config.types.Integer object at 0x2bbf170>), (u'connection_timeout', <mopidy.config.types.Integer object at 0x2bbf1b0>), (u'zeroconf', <mopidy.config.types.String object at 0x2bbf0d0>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bbf0f0>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bbf050>), (u'library', <mopidy.config.types.String object at 0x2bbfcf0>), (u'media_dir', <mopidy.config.types.Path object at 0x2bbfd30>), (u'data_dir', <mopidy.config.types.Path object at 0x2bbfd50>), (u'playlists_dir', <mopidy.config.types.Path object at 0x2bbfd70>), (u'tag_cache_file', <mopidy.config.types.Deprecated object at 0x2bbfd90>), (u'scan_timeout', <mopidy.config.types.Integer object at 0x2bbfdb0>), (u'scan_flush_threshold', <mopidy.config.types.Integer object at 0x2bbfdd0>), (u'excluded_file_extensions', <mopidy.config.types.List object at 0x2bbfdf0>)]), ConfigSchema([(u'enabled', <mopidy.config.types.Boolean object at 0x2bbfe10>), (u'protocols', <mopidy.config.types.List object at 0x2bbfe30>), (u'metadata_blacklist', <mopidy.config.types.List object at 0x2bbfe50>), (u'timeout', <mopidy.config.types.Integer object at 0x2bbfe70>)])], 'config': {u'spotify': {'username': None, 'password': None, 'settings_dir': '/var/lib/mopidy/.config/mopidy/spotify', 'enabled': True, 'cache_dir': '/var/lib/mopidy/.cache/mopidy/spotify', 'timeout': 10, 'toplist_countries': (u'AD', u'AR', u'AU', u'AT', u'BE', u'CO', u'CY', u'DK', u'EE', u'FI', u'FR', u'DE', u'GR', u'HK', u'IS', u'IE', u'IT', u'LV', u'LI', u'LT', u'LU', u'MY', u'MX', u'MC', u'NL', u'NZ', u'NO', u'PT', u'ES', u'SG', u'SE', u'CH', u'TW', u'TR', u'GB', u'US'), 'bitrate': 160}, u'touchscreen': {'fullscreen': False, 'screen_width': 320, 'enabled': True, 'cursor': True, 'cache_dir': '/var/lib/mopidy/.cache/mopidy/touchscreen', 'screen_height': 240}, u'logging': {'color': True, 'debug_file': '/var/lib/mopidy/mopidy.log', 'config_file': None, 'console_format': u'%(levelname)-8s %(message)s', 'debug_format': u'%(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n  %(message)s'}, u'stream': {'enabled': True, 'protocols': (u'file', u'http', u'https', u'mms', u'rtmp', u'rtmps', u'rtsp'), 'timeout': 5000, 'metadata_blacklist': ()}, u'spotify_tunigo': {'cache_time': 3600, 'region': u'all', 'enabled': True}, u'mpd': {'hostname': '127.0.0.1', 'enabled': True, 'zeroconf': u'Mopidy MPD server on $hostname', 'connection_timeout': 60, 'password': None, 'port': 6600, 'max_connections': 20}, 'simple-webclient': {'enabled': True}, u'mpris': {'enabled': True, 'desktop_file': '/usr/share/applications/mopidy.desktop'}, u'softwaremixer': {'enabled': True}, u'proxy': {'username': None, 'scheme': None, 'password': None, 'hostname': None, 'port': None}, u'moped': {'enabled': True}, u'musicbox_webclient': {'enabled': True}, u'http': {'zeroconf': u'Mopidy HTTP server on $hostname', 'enabled': True, 'hostname': '127.0.0.1', 'static_dir': None, 'port': 6680}, u'http-kuechenradio': {'enabled': True, 'default_locale': u'en', 'title': u'Mopidy K\xfcchenradio'}, u'audio': {'mixer_volume': None, 'output': u'autoaudiosink', 'mixer': u'software', 'visualizer': None}, u'local': {'excluded_file_extensions': (u'.directory', u'.html', u'.jpeg', u'.jpg', u'.log', u'.nfo', u'.png', u'.txt'), 'data_dir': '/var/lib/mopidy/.local/share/mopidy/local', 'scan_flush_threshold': 1000, 'scan_timeout': 1000, 'enabled': True, 'library': u'json', 'playlists_dir': '/var/lib/mopidy/.local/share/mopidy/local/playlists', 'media_dir': None}, u'api_explorer': {'enabled': True}}, 'desc': u'# For further information about options in this file see:\n#   http://docs.mopidy.com/\n#\n# The initial commented out values reflect the defaults as of:\n#   Mopidy 0.19.4\n#   None 0.1\n#   Mopidy-API-Explorer 1.0.1\n#   Mopidy-HTTP 0.19.4\n#   Mopidy-HTTP-Kuechenradio 0.4.2\n#   Mopidy-Local 0.19.4\n#   Mopidy-MPD 0.19.4\n#   Mopidy-MPRIS 1.1.1\n#   Mopidy-Moped 0.4.2\n#   Mopidy-MusicBox-Webclient 1.0.4\n#   Mopidy-SoftwareMixer 0.19.4\n#   Mopidy-Spotify 1.2.0\n#   Mopidy-Spotify-Tunigo 0.2.1\n#   Mopidy-Stream 0.19.4\n#   Mopidy-Touchscreen 0.2.1\n#\n# Available options and defaults might have changed since then,\n# run `mopidy config` to see the current effective config and\n# `mopidy --version` to check the current version.'}

Can you please help me?


#10

Thanks to your debug information I’ve tracked this down.

To reproduce the issue:

  • Install Mopidy-HTTP-Kuechenradio, which includes an non-ASCII UTF-8 character in its default config.
  • Don’t have any Mopidy config (remove ~/.config/mopidy/mopidy.conf)
  • Run any mopidy ... command

The issue is now fixed in the release/v0.19.x and develop branches, and will be included in the upcoming 0.19.5 and 0.20.0 releases.

Possible workarounds until new versions are out are either to:

  1. Run touch ~/.config/mopidy/mopidy.conf to create an empty config file to avoid the code path that crashes.

Or to:

  1. Uninstall Mopidy-HTTP-Kuechenradio.
  2. Run any mopidy command to generate the default config without the Kuechenradio section.
  3. Reinstall Mopidy-HTTP-Kuechenradio.

It should be said that this is not Mopidy-HTTP-Kuechenradio’s fault, but a bug in Mopidy core.


#11

Mopidy 0.19.5 is out now, so the simplest workaround is just to upgrade :slight_smile: