You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ echo -e 'r\xE9mi' | xargs touch
$ python
Python 2.7.7rc1 (default, May 21 2014, 12:59:42)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import fpath
>>> list(fpath.Dir('.').walk())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/venv/local/lib/python2.7/site-packages/fpath.py", line 699, in walk
s = child.stat(usecache=True, followlinks=not links)
File "/tmp/venv/local/lib/python2.7/site-packages/fpath.py", line 516, in stat
return Stats(self, usecache, followlinks)
File "/tmp/venv/local/lib/python2.7/site-packages/fpath.py", line 53, in __init__
self._stat()
File "/tmp/venv/local/lib/python2.7/site-packages/fpath.py", line 60, in _stat
self._cached = os.stat(unicode(self._path))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 1: ordinal not in range(128)
I know you're not the only project out there that gets it wrong, but in my quest for something sensible I did test yours, so I thought I'd let you know. My search goes on!
The text was updated successfully, but these errors were encountered:
Thanks for looking into it, and filing a bug report. I've lost most of my interest in this now that I'm working almost entirely in Python 3 and pathlib exists, but pull requests are welcome!
remram44
changed the title
fpath.Dir.walk() can't raise UnicodeDecodeError
fpath.Dir.walk() can raise UnicodeDecodeError
Jun 15, 2014
On Linux with Python 2:
I know you're not the only project out there that gets it wrong, but in my quest for something sensible I did test yours, so I thought I'd let you know. My search goes on!
The text was updated successfully, but these errors were encountered: