[tahoe-lafs-trac-stream] [tahoe-lafs] #1483: str(NoSuchChildError(nonascii)) raises an exception, causing the actual name to be lost in tracebacks
tahoe-lafs
trac at tahoe-lafs.org
Sun Aug 14 17:01:09 PDT 2011
#1483: str(NoSuchChildError(nonascii)) raises an exception, causing the actual
name to be lost in tracebacks
------------------------+----------------------------
Reporter: davidsarah | Owner: davidsarah
Type: defect | Status: new
Priority: major | Milestone: 1.10.0
Component: code | Version: 1.8.2
Keywords: error | Launchpad Bug:
------------------------+----------------------------
{{{
C:\tahoe\furry>bin\tahoe debug repl
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from allmydata.interfaces import NoSuchChildError
>>> str(NoSuchChildError(u'\u2621'))
Traceback (most recent call last):
File "<console>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2621' in
position 0: ordinal not in range(128)
}}}
Despite this, Twisted trial usually manages to print tracebacks in unit
test errors successfully. However it still causes ugliness and loss of
information, for example:
{{{
[ERROR]
Traceback (most recent call last):
File "c:\tahoe\furry\src\allmydata\dirnode.py", line 444, in _get
raise NoSuchChildError(name)
allmydata.interfaces.NoSuchChildError: <NoSuchChildError instance at
0x226b558 with str error:
Traceback (most recent call last):
File "C:\Python27\lib\site-
packages\twisted-10.2.0-py2.7-win32.egg\twisted\python\reflect.py", line
546, in _safeFormat
return formatter(o)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in
position 1: ordinal not in range
(128)
>
}}}
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1483>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list