473,324 Members | 2,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

TKinter and Python Sync. Problems

I am currently having trouble running a piece of code I have written. My
main code is called new.py, and when I run it, it pops up the TKinter root
window as specified. However, if I try perform a function that uses an
imported module, the code crashes, giving me this error:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, in __call__
return self.func(*args)
File "C:\jython\new.py", line 38, in save_var
var = expression.Variable(name, description)
AttributeError: 'module' object has no attribute 'Variable'

Now, when I close the TKinter window that popped up when the code was
compiled, an identical one is opened in its place. If I perform the same
action as before, the program works flawlessly. Also worth noting is that
when this same file is run from SPE, this problem does not ocur.

Does anyone have any idea why this would happen? I do not understand why a
new Window is created when I try to close it if run from the command line.
Also, I don't understand why it can't find the proper module the on the
first run, but can on the second. It seems weird that it doesn't also
happen from the IDE.

Another interesting thing to note is that if I run the module that it chokes
on intially, ie. 'python expr.py', it brings up the GUI associated with the
main code. The problem is, there is no TKinter related code in the expr
module!

If any additional info or clarification would be helpful, please let me
know. Thanks in advance for the help, as I am truly perplexed as to what is
going on!!
Jul 19 '05 #1
0 1258

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: srijit | last post by:
Hello, Any idea - why the following code crashes on my Win 98 machine with Python 2.3? Everytime I run this code, I have to reboot my machine. I also have Win32all-157 installed. from Tkinter...
7
by: John Slimick | last post by:
I want to do a little Tkinter in my 1 credit python practicum, but I am having problems getting everything installed correctly. A sample of the problem is below: ------------------- The...
7
by: SeeBelow | last post by:
Do many people think that wxPython should replace Tkinter? Is this likely to happen? I ask because I have just started learning Tkinter, and I wonder if I should abandon it in favor of...
6
by: mortuno | last post by:
Hi My tkinter apps worked fine in debian linux (woody and sarge) I moved to ubuntu 5.10 I follow the 'hello world' test as seen in http://wiki.python.org/moin/TkInter import _tkinter #...
1
by: Michael Yanowitz | last post by:
Hello: Below I have included a stripped down version of the GUI I am working on. It contains 2 dialog boxes - one main and one settings. It has the following problems, probably all related, that...
1
by: vijayca | last post by:
my python installation is:Active python 2.5.1 i am using Red Hat Linux i have the Tkinter module installed but any simple script produces an error.... script: from Tkinter import Label widget...
0
by: wolfonenet | last post by:
Hi All, My setup is: WinXP Python 2.5.1 TKinter version: $Revision: 50704 $ Tcl: 8.4 Debugger: WinPdb
3
by: J-Burns | last post by:
Hello. Im a bit new to using Tkinter and im not a real pro in programming itself... :P. Need some help here. Problem 1: How do I make something appear on 2 separate windows using Tkinter? By...
0
by: Steve Holden | last post by:
Allen Taylor wrote: You can publish it in the Python package index - see http://pypi.python.org/pypi/ If you want to have it considered for inclusion into future versions of Python then you...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.