~sschwarzer/ftputil#85: 
UnicodeDecodeError in FTPFile.close()

ftputil 3.1

Python 2.7.5 Stackless 3.1b3

Here is an extract of the traceback:

  File ".../lib/python2.7/site-packages/ftputil-3.1-py2.7.egg/ftputil/host.py", line 499, in download
    conditional=False, callback=callback)
  File ".../lib/python2.7/site-packages/ftputil-3.1-py2.7.egg/ftputil/file_transfer.py", line 184, in copy_file
    source_fobj.close()
  File ".../lib/python2.7/site-packages/ftputil-3.1-py2.7.egg/ftputil/file.py", line 289, in close
    exc = str(exc)
  File ".../lib/python2.7/site-packages/ftputil-3.1-py2.7.egg/ftputil/error.py", line 60, in __str__
    ftputil.version.version_info)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5: ordinal not in range(128)

I use ftputil in celery tasks; this error occures when celery detects that the task is too long and asks it to stop.

Status
RESOLVED FIXED
Submitter
ftputiluser (unverified)
Assigned to
No-one
Submitted
7 years ago
Updated
7 years ago
Labels
bug library

schwa (unverified) 7 years ago · edit

Thanks for the report!

Would you please replace the installed ftputil/error.py with the attached error.py and tell me if it helps? If not, what happens?

schwa (unverified) 7 years ago · edit

The problem should be fixed in [85db55cce826041a8ec7187d9cb9d1265e2fa2ea](https://git.sr.ht/~sschwarzer/ftputil/commit/85db55cce826041a8ec7187d9cb9d1265e2fa2ea "Make error handling more robust. This should also fix ticket #85. ...").

Lacking an answer from the original ticket author, I had to guess where the problem came from. If the problem actually isn't solved, please reopen the ticket.

Register here or Log in to comment, or comment via email.