Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#85 closed defect (fixed)

UnicodeDecodeError in FTPFile.close()

Reported by: ftputiluser Owned by: schwa
Priority: major Milestone: 3.2
Component: Library Version:
Keywords: Cc:

Description

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.

Attachments (1)

error.py (4.9 KB) - added by schwa 4 years ago.
Patched error.py

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by schwa

Patched error.py

comment:1 Changed 4 years ago by schwa

  • Status changed from new to assigned

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?

comment:2 Changed 4 years ago by schwa

  • Resolution set to fixed
  • Status changed from assigned to closed

The problem should be fixed in [406c84da6e3b].

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.

comment:3 Changed 4 years ago by schwa

  • Milestone set to 3.2
Note: See TracTickets for help on using tickets.