[Nvda-dev] UnicodeDecodeError in Log Viewer

Lubos Pintes lubos.pintes at orangemail.sk
Fri Dec 18 11:27:58 UTC 2009


Hi,
In reaction to ticket 513 (Bad console reading) I was wondering how it 
behaves. So, I tested with SAPI4 voice I am using. I discovered that 
some garbage is read between "h" and "i" when "print 'hi'" is written in 
Python console.
I then set log setting to I/O and wanted to test. But when I wanted to 
switch to log viewer, it signalled error sound and this error was logged:
ERROR - unhandled exception (12:19:08):
Traceback (most recent call last):
   File "c:\vcs\nvda\source\gui\__init__.py", line 230, in onViewLogCommand
     logViewer.activate()
   File "c:\vcs\nvda\source\gui\logViewer.py", line 82, in activate
     logViewer = LogViewer(gui.mainFrame)
   File "c:\vcs\nvda\source\gui\logViewer.py", line 40, in __init__
     self.refresh()
   File "c:\vcs\nvda\source\gui\logViewer.py", line 49, in refresh
     self.outputCtrl.AppendText(f.read())
   File "C:\Python26\lib\codecs.py", line 666, in read
     return self.reader.read(size)
   File "C:\Python26\lib\codecs.py", line 472, in read
     newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 
1284-1289: unsupported Unicode code range

It is always reproduceable. It is impossible to display Log Viewer window.



More information about the Nvda-dev mailing list