473,383 Members | 1,925 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,383 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

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 1265

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

Similar topics

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...
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...
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...
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 #...
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...
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...
by: wolfonenet | last post by:
Hi All, My setup is: WinXP Python 2.5.1 TKinter version: $Revision: 50704 $ Tcl: 8.4 Debugger: WinPdb
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...
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...
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.