This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2009年07月18日 08:00 by wplappert, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| tkpy_70.py | wplappert, 2009年07月18日 08:04 | |||
| Messages (8) | |||
|---|---|---|---|
| msg90656 - (view) | Author: Winfried Plappert (wplappert) | Date: 2009年07月18日 08:00 | |
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.
|
|||
| msg90657 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2009年07月18日 08:20 | |
Can you paste the full traceback? I tried to run the script on Windows and nothing happened when I pressed Ctrl+[0..9]. |
|||
| msg90659 - (view) | Author: Winfried Plappert (wplappert) | Date: 2009年07月18日 08:39 | |
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 |
|||
| msg90663 - (view) | Author: Winfried Plappert (wplappert) | Date: 2009年07月18日 09:16 | |
Is it possible that this issue is related to issue6144? BTW: I have to handcomile my python 3.1 :) |
|||
| msg90664 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2009年07月18日 09:34 | |
The same problems (ctrl+space and ctrl+2) were reported in #1028. Closing this as duplicate. |
|||
| msg90671 - (view) | Author: Winfried Plappert (wplappert) | Date: 2009年07月18日 10:20 | |
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! |
|||
| msg90674 - (view) | Author: Winfried Plappert (wplappert) | Date: 2009年07月18日 12:15 | |
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 |
|||
| msg90684 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2009年07月18日 15:29 | |
Do you know what 8.5.x version were you running before? You should report it to #1028, apparently they were trying to find out the affected versions there. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:51 | admin | set | github: 50761 |
| 2009年07月18日 15:29:20 | ezio.melotti | set | messages: + msg90684 |
| 2009年07月18日 12:15:48 | wplappert | set | messages: + msg90674 |
| 2009年07月18日 10:20:19 | wplappert | set | messages: + msg90671 |
| 2009年07月18日 09:39:51 | ezio.melotti | set | superseder: Tkinter binding involving Control-spacebar raises unicode error |
| 2009年07月18日 09:34:10 | ezio.melotti | set | status: open -> closed resolution: duplicate messages: + msg90664 stage: resolved |
| 2009年07月18日 09:16:15 | wplappert | set | messages: + msg90663 |
| 2009年07月18日 08:39:40 | wplappert | set | messages: + msg90659 |
| 2009年07月18日 08:20:00 | ezio.melotti | set | priority: low nosy: + ezio.melotti messages: + msg90657 type: behavior |
| 2009年07月18日 08:04:08 | wplappert | set | files: + tkpy_70.py |
| 2009年07月18日 08:03:36 | wplappert | set | files: - tkpy_70.py |
| 2009年07月18日 08:03:12 | wplappert | set | files: + tkpy_70.py |
| 2009年07月18日 08:01:45 | wplappert | set | files: - tkpy_70.py |
| 2009年07月18日 08:00:18 | wplappert | create | |