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

Can display, but not play, songs with paths that contain unicode #644

Closed
thevorpalblade opened this issue Oct 18, 2016 · 3 comments
Closed

Comments

@thevorpalblade
Copy link

thevorpalblade commented Oct 18, 2016

When I attempt to play songs with a unicode character somewhere in the file path,
the playback silently fails.
The following path triggers the bug:

/home/matthew/Music/Anaïs Mitchell/Hadestown/13 If It's True.flac

The following error shows up in the log roughly every 100 ms until the song is manually skipped:


ERROR    [2016-10-18 14:59:22,868] : cherrypy.error.3054734508 : from line (217) at
    /usr/lib/python3.5/site-packages/cherrypy/_cplogging.py
    --
    [18/Oct/2016:14:59:22] HTTP 
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python3.5/site-packages/cherrypy/lib/encoding.py", line 220, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/cherrypy/_cpdispatch.py", line 60, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python3.5/site-packages/cherrymusicserver/httphandler.py", line 256, in trans
    path = codecs.decode(codecs.encode(path, 'latin1'), 'utf-8')
  File "/usr/lib/python3.5/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xef in position 3: invalid continuation byte
--------------------------------------------------------------------------------

I'm running version 0.37 under arch linux, with python 3.5.2.
Testing that the appropriate locales are installed seems to indicate that they are:

>>> locale.getlocale()
('en_US', 'UTF-8')

This seems like it could be related to:
#595
But I don't have that problem (I can browse to the folder containing this album with no issue)
It doesn't seem related to #611 or #642, since those are throwing ascii decode errors, not unicode decode errors.

@tilboerner
Copy link
Collaborator

tilboerner commented Oct 24, 2016

@thevorpalblade Which version of CherryPy is Cherrymusic using? (It's listed in the output of $ ./cherrymusic --info)

@thevorpalblade
Copy link
Author

thevorpalblade commented Oct 24, 2016

looks like CherryPy: 8.1.0, which is the latest version in the arch linux community repository.

@tilboerner
Copy link
Collaborator

This should be resolved by #659.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants