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
Try version 2.8 from SOURCEFORGE if you run into errors with version 2.9.2.
I installed using pip, had issues, so I downgraded to 2.8 by replacing the file contents of version 2.9.2 with those from 2.8, but I kept utils from 2.9.2 in the install location - no errors after that and drag and drop worked fine.
I will expand upon this further at a later time with more descriptive info and file locations.
Just brief for now.
Edit:
pip install python-tkdnd | known as: python-tkdnd 0.2.1 (~ https://pypi.org/project/python-tkdnd/ ~) | but this installed: tkinterDnD 2.9.2 | but this version was causing trouble; errors and such, so I manually replaced it with version 2.8 that was manually downloaded from SOURCEFORGE: (tkdnd2.8-win32-ix86.tar.gz) ~ https://sourceforge.net/projects/tkdnd/files/ ~, but tkdnd_utils.tcl from 2.9.2 was kept by me to stay with the 2.8 replacement version though and left in its directory. %USERPROFILE%\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\tkinterDnD\windows | This is the location where the files were replaced. My application's drag and drop is now working. import tkinter as tk; from tkinter import ttk, filedialog; import tkinterDnD. Just wanted to share this in case anyone else found themselves experiencing problems.
If I can find my history of any of the actual errors that occurred at the time with version 2.9.2, I'll edit this again and include those here as well.
So, it seemed that there was an issue with loading the libtkdnd2.9.2.dll dynamic link library file which is required by TkinterDnD. This error indicated to me that that the DLL file could not be loaded, which that likely caused the TkDnDVersion initialisation to fail.
AND I THINK I HAVE JUST CRACKED WHY - POTENTIALLY VERSION 2.9.2 MAY HAVE TYPO'D THE FOLLOWING FOLDER:
It's very subtle but in the directory: Python36-32
There are two folders:
One named: libs
And one named: Lib
And the latter folder has a CAPITAL, L - and maybe the DLL failed to load for me due to version 2.9.2 having made a typo and used a lower case, l.
This could explain the error and why it could not load the DLL for me, but I cannot confirm this though. I am speculating.
pip show python-tkdnd
Name: python-tkdnd
Version: 0.2.1 | tkinterDnD 2.9.2 which was installed like this: pip install python-tkdnd, but this version was manually replaced by user with version 2.8 that was manually downloaded from SOURCEFORGE: (tkdnd2.8-win32-ix86.tar.gz) | ~ https://sourceforge.net/projects/tkdnd/files/ ~ |, but tkdnd_utils.tcl from 2.9.2 was kept with the 2.8 version though.
Summary: Native drag & drop capabilities in tkinter. The tkinterDnD package is a
nice and easy-to-use wrapper around the tkdnd tcl package.
Home-page: https://github.com/rdbende/tkinterDnD
Author: rdbende
Author-email: [email protected]
License: MIT license
Location: c:\users\X\appdata\local\programs\python\python36-32\lib\site-packages
Requires: ttkwidgets
Try version 2.8 from SOURCEFORGE if you run into errors with version 2.9.2.
I installed using pip, had issues, so I downgraded to 2.8 by replacing the file contents of version 2.9.2 with those from 2.8, but I kept utils from 2.9.2 in the install location - no errors after that and drag and drop worked fine.
I will expand upon this further at a later time with more descriptive info and file locations.
Just brief for now.
Edit:
pip install python-tkdnd | known as: python-tkdnd 0.2.1 (~ https://pypi.org/project/python-tkdnd/ ~) | but this installed: tkinterDnD 2.9.2 | but this version was causing trouble; errors and such, so I manually replaced it with version 2.8 that was manually downloaded from SOURCEFORGE: (tkdnd2.8-win32-ix86.tar.gz) ~ https://sourceforge.net/projects/tkdnd/files/ ~, but tkdnd_utils.tcl from 2.9.2 was kept by me to stay with the 2.8 replacement version though and left in its directory. %USERPROFILE%\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\tkinterDnD\windows | This is the location where the files were replaced. My application's drag and drop is now working. import tkinter as tk; from tkinter import ttk, filedialog; import tkinterDnD. Just wanted to share this in case anyone else found themselves experiencing problems.
If I can find my history of any of the actual errors that occurred at the time with version 2.9.2, I'll edit this again and include those here as well.
Edit2:
Error section:
TkDnDVersion = master.tk.call('package', 'require', 'tkdnd')
_tkinter.TclError: couldn't load library "%USERPROFILE%\AppData\Local\Programs\Python\Python36-32\lib\site-packages\tkinterDnD\windows/libtkdnd2.9.2.dll"
So, it seemed that there was an issue with loading the libtkdnd2.9.2.dll dynamic link library file which is required by TkinterDnD. This error indicated to me that that the DLL file could not be loaded, which that likely caused the TkDnDVersion initialisation to fail.
AND I THINK I HAVE JUST CRACKED WHY - POTENTIALLY VERSION 2.9.2 MAY HAVE TYPO'D THE FOLLOWING FOLDER:
Correct:
Python\Python36-32\Lib\site-packages\tkinterDnD
Incorrect:
Python\Python36-32\lib\site-packages\tkinterDnD
It's very subtle but in the directory: Python36-32
There are two folders:
One named: libs
And one named: Lib
And the latter folder has a CAPITAL, L - and maybe the DLL failed to load for me due to version 2.9.2 having made a typo and used a lower case, l.
This could explain the error and why it could not load the DLL for me, but I cannot confirm this though. I am speculating.
pip show python-tkdnd
Name: python-tkdnd
Version: 0.2.1 | tkinterDnD 2.9.2 which was installed like this: pip install python-tkdnd, but this version was manually replaced by user with version 2.8 that was manually downloaded from SOURCEFORGE: (tkdnd2.8-win32-ix86.tar.gz) | ~ https://sourceforge.net/projects/tkdnd/files/ ~ |, but tkdnd_utils.tcl from 2.9.2 was kept with the 2.8 version though.
Summary: Native drag & drop capabilities in tkinter. The tkinterDnD package is a
nice and easy-to-use wrapper around the tkdnd tcl package.
Home-page: https://github.com/rdbende/tkinterDnD
Author: rdbende
Author-email: [email protected]
License: MIT license
Location: c:\users\X\appdata\local\programs\python\python36-32\lib\site-packages
Requires: ttkwidgets
Resources I've been to; random list:
https://pypi.org/project/python-tkdnd/
https://sourceforge.net/projects/tkdnd/files/
https://sourceforge.net/projects/tkdnd/
https://github.com/petasis/tkdnd
https://github.com/petasis/tkdnd/issues
petasis/tkdnd#64
petasis/tkdnd#53
https://mail.python.org/pipermail/tkinter-discuss/2005-July/000476.html
https://stackoverflow.com/questions/75526264/using-drag-and-drop-files-or-file-picker-with-customtkinter
https://docs.python.org/3/library/tkinter.dnd.html
https://github.com/rdbende/tkinterDnD
https://github.com/rdbende/tkinterDnD/issues
#9
The text was updated successfully, but these errors were encountered: