UnicodeDecodeError when there is non-ascii characters in path to files
tiktuk opened this issue · 0 comments
tiktuk commented
python podcats.py serve --host tiktuk.net --port 5001 ~/Æblegrød
gives the following error when I press play in my podcast player:
Traceback (most recent call last): File "/home/tuk/.virtualenvs/podcats/lib/python2.7/site-packages/flask/app.py", line 1997, in __call__ return self.wsgi_app(environ, start_response) File "/home/tuk/.virtualenvs/podcats/lib/python2.7/site-packages/flask/app.py", line 1985, in wsgi_app response = self.handle_exception(e) File "/home/tuk/.virtualenvs/podcats/lib/python2.7/site-packages/flask/app.py", line 1540, in handle_exception reraise(exc_type, exc_value, tb) File "/home/tuk/.virtualenvs/podcats/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/home/tuk/.virtualenvs/podcats/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/tuk/.virtualenvs/podcats/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/tuk/.virtualenvs/podcats/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/home/tuk/.virtualenvs/podcats/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/tuk/.virtualenvs/podcats/lib/python2.7/site-packages/flask/helpers.py", line 928, in send_static_file cache_timeout=cache_timeout) File "/home/tuk/.virtualenvs/podcats/lib/python2.7/site-packages/flask/helpers.py", line 669, in send_from_directory filename = safe_join(directory, filename) File "/home/tuk/.virtualenvs/podcats/lib/python2.7/site-packages/flask/helpers.py", line 639, in safe_join return posixpath.join(*parts) File "/usr/lib/python2.7/posixpath.py", line 71, in join path += b UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)