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
(Originally posted in python/cpython, closed there and opened here because of using this repo's library.)
Handling of a Drag-n-Drop event with tkinter causes an exception:
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\tkinter\__init__.py", line 1920, in __call__
args = self.subst(*args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\tkinter\__init__.py", line 1605, in _substitute
e.serial = getint(nsign)
_tkinter.TclError: expected integer but got "%#"
The basic code used is this (more code is in the app, but this should be the relevant parts of the setup):
def drop(event):
print("DROP EVENT:", event) # test code to see what's delivered
import tkinterDnD
root = tkinterDnD.Tk()
root.register_drop_target("*")
root.bind("<<Drop>>", drop)
The intent is to capture a file dragged from another application. With the 'register' function, this Python program and the OS indicate that the program's window is a valid place to drop a file dragged from a file manager program (specifically using Windows Explorer). After 'dropping', the error shown above is seen.
Environment:
CPython versions tested on: Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0
Operating system and architecture: Windows 10
The text was updated successfully, but these errors were encountered:
(Originally posted in python/cpython, closed there and opened here because of using this repo's library.)
Handling of a Drag-n-Drop event with tkinter causes an exception:
The basic code used is this (more code is in the app, but this should be the relevant parts of the setup):
The intent is to capture a file dragged from another application. With the 'register' function, this Python program and the OS indicate that the program's window is a valid place to drop a file dragged from a file manager program (specifically using Windows Explorer). After 'dropping', the error shown above is seen.
Environment:
CPython versions tested on: Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0
Operating system and architecture: Windows 10
The text was updated successfully, but these errors were encountered: