New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileBackend failing base path not a bytestring #1725

Closed
CrashyBang opened this Issue Nov 25, 2018 · 1 comment

Comments

2 participants
@CrashyBang

CrashyBang commented Nov 25, 2018

When I try to use the mopidy file browser ([Files] in ncmpcpp) I get the following error:

ERROR    FileBackend 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 112, in _browse
    result = backend.library.browse(uri).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)
  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/file/library.py", line 53, in browse
    if not self._is_in_basedir(os.path.realpath(local_path)):
  File "/usr/lib/python2.7/dist-packages/mopidy/file/library.py", line 146, in _is_in_basedir
    for media_dir in self._media_dirs)
  File "/usr/lib/python2.7/dist-packages/mopidy/file/library.py", line 146, in <genexpr>
    for media_dir in self._media_dirs)
  File "/usr/lib/python2.7/dist-packages/mopidy/internal/path.py", line
210, in is_path_inside_base_dir
    raise ValueError('base_path is not a bytestring')
ValueError: base_path is not a bytestring

From the few issues I could find it I believe it is to do with system file encodings ascii vs unicode? If there is anything I can do to further debug this let me know.

I am on debian running Mopidy 2.2.1

@jodal

This comment has been minimized.

Member

jodal commented Nov 26, 2018

I've reproduced this and have a fix that I'll push as soon as my ISP fixes my Internet connection.

Thanks for reporting!

@jodal jodal self-assigned this Nov 26, 2018

@jodal jodal added this to the v2.2.2 milestone Nov 26, 2018

jodal added a commit that referenced this issue Nov 27, 2018

jodal added a commit that referenced this issue Nov 27, 2018

@jodal jodal closed this Nov 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment