Python-TK File/Folder Selection Crashes in Jessie

Get your foo on.

Python-TK File/Folder Selection Crashes in Jessie

Postby Gerowen » October 5th, 2015, 6:06 am

So I'm running Debian 8 Jessie, and I've got a handful of Python programs/scripts I wrote years ago and have used on Ubuntu and older versions of Debian without issue. Just installed Debian 8 a few weeks ago since my installs of Ubuntu were about to get replaced (15.10 is coming out) anyway, so I figured why not give Debian a shot. Very pleased for the most part, but whenever I try running my scripts that call on python-tk to create a file or folder selection dialog, Python crashes. My scripts use the "easygui" frontend to tkinter, but I tried doing it with just straight tkinter as well and I get the same thing.

To re-create the issue, just create a variable that is equal to the filename of a file or folder you select using a tk window, and then try printing the value of that variable. In IDLE it prints "Restarting" and clears all stored variables (I guess that means it restarted the interpreter), and if you run an affected script in the terminal you get. I've also tried using both Python 2 and Python 3, and the issue happens both times. One of the affected pieces of software is one I've got on SourceForge, just download it and try to run the checkmd5.pyw file (it's plain text if you're paranoid so just open it up and look at it). ... =directory

Code: Select all
alloc: invalid block: 0x1ba4e90: 90 1

Edit: I've since re-done the scripts in question in Bash just so I have something to fill the need, but I've got one or two of these on SourceForge (just wanted to share them with the community) and people do download them, so I figure if I'm gonna share it with people and tell them it does something, it would be irresponsible of me to not try and figure out what is different about this particular machine that makes it fail.
Posts: 3
Joined: October 5th, 2015, 5:53 am

Re: Python-TK File/Folder Selection Crashes in Jessie

Postby BowCatShot » January 25th, 2016, 5:33 pm

Just learning python so I gave your app a try. I've got 2.7, 3, and 3.2 installed. The program won't even run on any of them. Doesn't think I have tkinter but I do.

My opinion of python is sinking fast. I never saw such a version mess. Python seems to have replaced dll hell or shared library hell with version hell.

Anyhow this is the error that I get:
Traceback (most recent call last):
File "./checkmd5.pyw", line 9, in <module>
from easygui import *
File "/home/nick/development/Python/CheckMD5/", line 87, in <module>
from Tkinter import *
File "/usr/lib/python2.7/lib-tk/", line 42, in <module>
raise ImportError, str(msg) + ', please install the python-tk package'
ImportError: No module named _tkinter, please install the python-tk package

I don't even want to screw around with trying to get it to work.
Posts: 72
Joined: May 10th, 2014, 2:29 pm

Re: Python-TK File/Folder Selection Crashes in Jessie

Postby Gerowen » January 25th, 2016, 7:56 pm

There's separate packages for python-tk in Jessie. python-tk is for Python 2, and python3-tk is for Python 3.
Posts: 3
Joined: October 5th, 2015, 5:53 am

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest