Archived Forum Post

Index of archived forum posts


Python: UnicodeDecodeError: 'utf-8' codec can't decode byte

Feb 27 '14 at 10:15

I'm trying SFTP Read Directory Listing(Python) of your example code.
Here's the error message.

Traceback (most recent call last):
  File "C:/Users/chilkat/workspace/PythonTest/", line 103, in <module>
  File "C:/Python33/lib/site-packages/", line 5601, in filename
46 files~!!
    def filename(self): return _chilkat.CkSFtpFile_filename(self)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 0: invalid start byte
I'm using python33 and eclipse on MS Windows. Please let me know how to fix this problem.


The "Utf8" property can be set to True to indicate that Chilkat should return utf-8 strings, and also interpret input string arguments as utf-8. (When Utf8 is False, which is the default, then ANSI strings are expected and returned by the Chilkat API.)

For example:

# indicate that input/output strings should be utf-8