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

使用ftp客户端连接,多级目录中带中文会提示异常,无法进入目录 #16

Open
LostHub opened this issue Aug 6, 2024 · 0 comments

Comments

@LostHub
Copy link

LostHub commented Aug 6, 2024

数组取值dir_name、key_name 异常导致。改为字符串替换可以使用。

Traceback (most recent call last):
File "/usr/local/cos-ftp-server-for-test/venv/lib/python2.7/site-packages/pyftpdlib-1.5.7-py2.7.egg/pyftpdlib/handlers.py", line 1728, in _on_dtp_connection
self.data_channel.push_with_producer(data)
File "/usr/local/cos-ftp-server-for-test/venv/lib/python2.7/site-packages/pyftpdlib-1.5.7-py2.7.egg/pyftpdlib/handlers.py", line 671, in push_with_producer
AsyncChat.push_with_producer(self, producer)
File "/usr/lib64/python2.7/asynchat.py", line 190, in push_with_producer
self.initiate_send()
File "/usr/local/cos-ftp-server-for-test/venv/lib/python2.7/site-packages/pyftpdlib-1.5.7-py2.7.egg/pyftpdlib/handlers.py", line 677, in initiate_send
asynchat.async_chat.initiate_send(self)
File "/usr/lib64/python2.7/asynchat.py", line 226, in initiate_send
data = first.more()
File "/usr/local/cos-ftp-server-for-test/venv/lib/python2.7/site-packages/pyftpdlib-1.5.7-py2.7.egg/pyftpdlib/handlers.py", line 1097, in more
buffer.append(next(self.iterator))
File "/usr/local/cos-ftp-server-for-test/ftp_v5/cos_file_system.py", line 483, in format_mlsx
line = "type=%s;size=%d;perm=%s;modify=%s %s\r\n" % (ft, size, perm, last_modified, name.decode('utf-8'))
File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x86 in position 0: invalid start byte

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

1 participant