You are not logged in.

#1 2006-02-07 10:27:12

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

wxpython, popupmenu and UnicodeDecodeError

Hey,

I'm working on a small wxPython app but I'm getting a weird decoding error and I don't know where it would be coming from. When I run it the window loads fine but rightclicking on the tray icon  dumps this to the terminal (the app doesn't crash):

File "btproximity.py", line 46, in PopupMenu
    self.PopupMenu(menu)
  File "btproximity.py", line 46, in PopupMenu
    self.PopupMenu(menu)
  File "btproximity.py", line 46, in PopupMenu
    self.PopupMenu(menu)
  File "btproximity.py", line 46, in PopupMenu
    self.PopupMenu(menu)
  File "btproximity.py", line 43, in PopupMenu
    menu.Append(self.menushow, "Show Info")
  File "/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line 10202, in Append
    return _core_.Menu_Append(*args, **kwargs)
  File "/usr/lib/python2.4/encodings/iso8859_1.py", line 22, in decode
    return codecs.charmap_decode(input,errors,decoding_map)
UnicodeDecodeError: 'charmap' codec can't decode byte 0x68 in position 1: character maps to <undefined>

That first bit is repeated a crapload of times. Here is the code. If anyone has any ideas I'd really appreciate it. It's a bit over my head, I've Googled and tried making manual calls to the codecs module to see if I can figure out what's causing it but no go. I recently changed my locale from en_US to en_AU but running the script with --locale=en_US didn't make any difference sad

Offline

Board footer

Powered by FluxBB