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

fs.sshfs 2.0.20 cannot walk a nonunicode filename #14

Open
dstromberg opened this issue May 9, 2018 · 2 comments
Open

fs.sshfs 2.0.20 cannot walk a nonunicode filename #14

dstromberg opened this issue May 9, 2018 · 2 comments
Labels
bug something does not work external derives from an external error

Comments

@dstromberg
Copy link

dstromberg commented May 9, 2018

fs.sshfs cannot walk the following nonunicode file:

>>> os.listdir('.')
['Ma\udcf1ana']

The special character is a Spanish n~, in an unknown, 8 bit encoding.

The error looks like:

 File "/home/dstromberg/src/pyfilesystem-tests/lib/python3.6/site-packages/paramiko/sftp_client.py", line 222, in listdir_attr
   filename = msg.get_text()
 File "/home/dstromberg/src/pyfilesystem-tests/lib/python3.6/site-packages/paramiko/message.py", line 178, in get_text
   return u(self.get_string())
 File "/home/dstromberg/src/pyfilesystem-tests/lib/python3.6/site-packages/paramiko/py3compat.py", line 143, in u
   return s.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 2: invalid continuation byte
@althonos althonos added the bug something does not work label May 10, 2018
@dstromberg
Copy link
Author

Here's a bash command for how I've been creating the file for testing purposes:

echo foo > to-be-saved/"Ma$(echo | tr '\012' '\361')ana"

@althonos
Copy link
Owner

Related to paramiko/paramiko#546, this is a paramiko bug.

@althonos althonos added the external derives from an external error label Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something does not work external derives from an external error
Projects
None yet
Development

No branches or pull requests

2 participants