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
bpo-6108: unicode(exception) and str(exception) should return the same message on Py2.6
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2009-09-16.19:59:17.087>created_at=<Date2009-09-11.20:50:43.426>labels= ['expert-IO']
title='IOError has no __unicode__ method - and loses information'updated_at=<Date2009-09-16.19:59:17.079>user='https://github.com/voidspace'
>>> try:
... open('flooble')
... exceptExceptionas e:
... pass
...
[39343 refs]
>>> str(e)
"[Errno 2] No such file or directory: 'flooble'"
[39345 refs]
>>> unicode(e)
u"(2, 'No such file or directory')"
The Unicode representation of an IOError has no information about the
file or directory name. This is a regression from 2.5. Would be nice to
backport a fix to 2.6 if we can.
This bit docutils - and can happen as a side-effect of interpolating
into a Unicode string with %s. The filename information is lost from the
error report.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: