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
Thanks for the interest and report. Yes, this looks like a bug with copy_remote_file - encoding is not passed on when recursion is enabled. Worth checking the same is not true for copy_file as well.
For general questions please use the mail group.
Describe the bug
When copy_remote_file is used with recurse=True and a specific encoding. The encoding don't seem to work.
To Reproduce
The problem occur when files or folders contain non ascii character. Something like "Suivi activité" in my case.
Steps to reproduce the behavior:
client.copy_remote_file("/", "/some/folder/", recurse=True, encoding="cp1252")
Expected behavior
The encoding should work on files and subfolders
Actual behaviour
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 32: invalid continuation byte
Additional information
I think the root cause is that _copy_remote_dir in base/single.py don't pass the encoding parameter.
The text was updated successfully, but these errors were encountered: