You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: illegal encoding #50761
As I said, it does work on Windows, but NOT on Linux!
Her is the full traceback:
wplapper@lin-wpl:~/sudoku/version3.0/tk_test/python3$ python3 tkpy_70.py
key_control_num 1 (# I pressed Control-1)
Traceback (most recent call last):
File "tkpy_70.py", line 27, in <module>
app.mainloop()
File "/usr/local/lib/python3.1/tkinter/__init__.py", line 1009, in
mainloop
self.tk.mainloop(n)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1:
illegal encoding
wplappert commented on Jul 18, 2009
wplappertmannequin
MannequinAuthor
More actions
Is it possible that this issue is related to bpo-6144?
I have verified that the problem goes away when you switch from
tcl/tk8.4 to tcl/tk8.5 . Luckily my Ubuntu 9.04 has the 8.5-version
available for install. Thanks for the quick help!
wplappert commented on Jul 18, 2009
wplappertmannequin
MannequinAuthor
More actions
wplapper@lin-wpl:~/sudoku/version3.0/tk_test/python3$ python3
Python 3.1 (r31:73572, Jul 18 2009, 11:13:40)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> print(tkinter.Tcl().tk.call('info', 'patchlevel'))
8.5.6
Do you know what 8.5.x version were you running before?
You should report it to bpo-1028, apparently they were trying to find out
the affected versions there.
Activity
wplappert commentedon Jul 18, 2009
When running the attached program, it will fail with above message on
Control-2 only! All other control keys work happily.
The same program under MS-Windows seems to work (I am under Linux, so I
can't switch easily).
My version of Python:
Python 3.1 (r31:73572, Jul 18 2009, 08:33:59)
[GCC 4.3.3] on linux2
uname -a: Linux lin-wpl 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30
19:49:51 UTC 2009 i686 GNU/Linux
Do I have to replace the line:
self.c.bind('<Control-Key-' + str(i) + '>',
lambda x=str(i): self.key_control_num(x))
with something different? str->unicode, bytes???
This does not help either:
bytes("<Control-Key-" + str(i) + ">", 'utf-8')
This program has been converted via 2to3.
ezio-melotti commentedon Jul 18, 2009
Can you paste the full traceback?
I tried to run the script on Windows and nothing happened when I pressed
Ctrl+[0..9].
wplappert commentedon Jul 18, 2009
As I said, it does work on Windows, but NOT on Linux!
wplappert commentedon Jul 18, 2009
Is it possible that this issue is related to bpo-6144?
BTW: I have to handcomile my python 3.1 :)
ezio-melotti commentedon Jul 18, 2009
The same problems (ctrl+space and ctrl+2) were reported in bpo-1028.
Closing this as duplicate.
wplappert commentedon Jul 18, 2009
I have verified that the problem goes away when you switch from
tcl/tk8.4 to tcl/tk8.5 . Luckily my Ubuntu 9.04 has the 8.5-version
available for install. Thanks for the quick help!
wplappert commentedon Jul 18, 2009
ezio-melotti commentedon Jul 18, 2009
Do you know what 8.5.x version were you running before?
You should report it to bpo-1028, apparently they were trying to find out
the affected versions there.