wasm-demo/demo/ermis-f/python_m/cur/0062

85 lines
2.6 KiB
Plaintext

From: news at dorb.com (Darrell)
Date: Thu, 29 Apr 1999 10:45:41 -0400
Subject: Fatal Python error: PyThreadState_Get: no current thread
References: <m4izp3rc21l.fsf@macquarie.com.au>
Message-ID: <V8_V2.7141$YU1.12575@newsr2.twcny.rr.com>
Content-Length: 2310
X-UID: 62
I was just trouble shooting a problem like this. I was using python.exe and
a xxx.pyd. The xxx.pyd had debug turned on and should have been named
xxx_d.pyd. When I ran with python_d.exe the "no current thread" error
cleared up.
If your lucky the Windows and Unix ports have this in common.
--Darrell
Timothy Docker <timd at macquarie.com.au> wrote in message
news:m4izp3rc21l.fsf at macquarie.com.au...
>
>
> I've seen questions related to this error in dejanews, but no
> definitive answer. It seems that this error can indicate a variety of
> misconfigurations. Here's my situation:
>
> I have a program written a while ago under python 1.4 that I am trying
> to run under python 1.5.1. This program uses Tkinter, and makes no
> reference to Threads. On my Solaris 2.6 machine here I have
>
> python1.4 - compiled without threads
> python1.5.1 - compiled with threads
> python1.5.2 - compiled with threads
>
> After a lot of reduction, I ended up with the 10 or so lines shown
> below. If I run it each of the installed versions and press the
> displayed quit button, I see the following
>
> | qad16:tools $ /opt/python/python1.4/sunos5/bin/python test.py
> | qad16:tools $ /opt/python/python1.5.1/bin/python test.py
> | Fatal Python error: PyThreadState_Get: no current thread
> | Abort
> | qad16:tools $ /opt/python/python1.5.2/bin/python test.py
> | qad16:tools $
>
> So... what's wrong with my 1.5.1 installation? Have I misconfigured
> the thread stuff, or is a bug that has been fixed in 1.5.2? There is a
> note in the Misc/NEWS of 1.5.2 that says that PyThreadState_Get has
> been replaced by a macro that doesn't do error checking. Does this
> mean that the problem is still lurking in my 1.5.2 installation?
>
> Thanks for any pointers!
>
> Tim
>
> -------------------- test.py --------------------
> import sys
> from Tkinter import *
>
> def cancel():
> sys.exit(0)
>
> def quitFromWM(event):
> pass
>
> mf = Frame()
> mf.bind("<Destroy>", quitFromWM )
> f = Frame(mf).pack(side=BOTTOM,fill=BOTH)
> Button( f, text = 'Quit', command = cancel ).pack()
> mf.mainloop()
>
>
>
>
> --------------------------------------------------------------
> Tim Docker timd at macquarie.com.au
> Quantative Applications Division
> Macquarie Bank