
July 1st, 2003, 10:44 AM
|
|
Registered User
|
|
Join Date: Jul 2003
Location: Brisbane, Australia
Posts: 12
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Python, wxPython and Unicode errors
Hi there,
I'm implementing a recursive file search in Python (in Windows XP, latest versions of wxPython and Python) and have come across a particularly frustrating Unicode exception in a completely unexpected place ...
File "....\search\Search.py", line 312, in __search_directory_recurse
results.extend( self.__search_directory_recurse( full_path, pattern, re_mode, flags ) )
File ".....\search\Search.py", line 304, in __search_directory_recurse
for fname in outfiles:
UnicodeError: ASCII decoding error: ordinal not in range(128)
How can a for loop cause a UnicodeError?
Also, I get the exact same error (same type, different location) if I try to print messages to standard output at too great a rate (from within a for loop, presumably because wxPython catches output in the special stdout window, and I'm guessing that the toes of GUI threads are getting trampled - but a UnicodeError??).
If anyone could offer some insight as to what would cause the former error to occur, please let me know.
Thanks!
|