PyPE v2.6.3, wxPython 2.6.3.3-unicode, running from
source (both binaries failed)
message:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\PyPE-2.6.3>c:\python24\python.exe pype.pyw
[ Tue Aug 15 20:09:26 2006 ] Loading menus from
Traceback (most recent call last
):
File "pype.pyw", line 7, in ?
sys.modules['main'] =
imp.load_source('main', 'pype.py', open('pype.
py'))
File "pype.py", line 4401, in ?
main()
File "pype.py", line 4391, in main
filehistory.root = root = app.frame =
MainWindow(None, -1, "PyPE", docs)
File "pype.py", line 627, in init
print "Loading menus from", path
File "C:\PyPE-2.6.3\plugins\logger.py", line 35, in write
sys.stdout.write(x.encode('utf8'))
UnicodeDecodeError: 'ascii' codec can't decode byte
0xe9 in position 31: ordinal
not in range(128)
If I make line 35 of logger.py look like this:
sys.stdout.write(x)
Then runs, but there probabably was a good reason for
you decide to encode the output.
My $HOME is like this:
C:\Documents and Settings\ianaré
0xe9 is the 'é' character.
I'm perfectly aware this type of issue is normally
rather irritating to those that have ascii-only names. :p
Cheers
Logged In: YES
user_id=341410
I've fixed it for everyone by adding the following block
before the two (not four) examples where it is necessary:
if isinstance(x, str): x.decode('latin1')
The two timestamp sections do not need this, as they should
never produce strings that make the logger fail.
Thank you for the bug report.