encoding error

R

ryan

1) i have a function that i made in one of my program's modules named
"input_box.py" that uses unicode:

def get_key():
while 1:
event = pygame.event.poll()
if event.type == KEYDOWN:
ev_unicode = event.unicode
if type(ev_unicode) == types.UnicodeType:
if ev_unicode == '':
ev_unicode = 0
else:
ev_unicode = ord(ev_unicode)
value = unichr(ev_unicode).encode('latin1')
return (event.key, value)
else:
pass
------------------
2) i use py2exe to compile it with the option for encodings, like the docs
say:

python setup.py py2exe --packages encodings
--------
3) I still get the error:
Traceback (most recent call last):
File "<string>", line 110, in ?
File "<string>", line 82, in main
File "handle_keyboard.pyc", line 113, in handle_keyboard
File "open_url.pyc", line 126, in open_url
File "input_box.pyc", line 53, in ask
File "input_box.pyc", line 21, in get_key
LookupError: no codec search functions registered: can't find encoding
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top