Skip to content
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
chopfitzroy opened this issue Nov 25, 2018 · 1 comment
Closed

FileBackend failing base path not a bytestring #1725

chopfitzroy opened this issue Nov 25, 2018 · 1 comment
Assignees
Labels
A-file Area: File backend C-bug Category: This is a bug
Milestone

Comments

@chopfitzroy
Copy link

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
Copy link
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 C-bug Category: This is a bug A-file Area: File backend labels 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 as completed Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-file Area: File backend C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants