[visionegg] Re: _imagingtk error

Hi, Andrew,

Indeed it does appear to be a conflict between the main stimulus window and tkinter... a simple script I wrote employing both gives the same issues as the drumgui demo (i.e., both windows pop up, then exception and crash).

I tried to get PyUI to work, but that's still in the alpha stage of development, and while I can get a window up, can't get much else.

Seems like I'm going to have to write a custom dialogbox module in the form of a simple text buffer, but I'll be looking into other gui packages soon.

-=gabe

Gabriel Nevarez
Research Programmer
Psychology Department
Cardiff University
http://www.cf.ac.uk/psych/

Gabriel Nevarez wrote:

For example, the VisionEgg demo "drumDemoGUI.py" exits with the
following error
message:

Fatal Python error: PyEval_SaveThread: NULL tstate
Abort trap

First the bad news, now that I've had a chance to try this on my iBook: I get the same problem as you. :(

After seeing the normal Vision Egg window pop up, as well as the
intended Tkinter GUI window for a brief instant before this crash in
which both windows are closed, I suspect some sort of nasty interaction
between Tkinter and (Mac OS X) pygame.  I suspect they're fighting for
control of the display, and our scripts are the losers.

Unfortunately, this looks like the kind of thing I could sink
significant time into without a guarantee that I could make the fix or
find a useful solution.  If you want to delve deeper, I suggest writing
a minimum possible app that dies the same way (just open a pygame and
Tkinter window?)  and send it to the appropriate package maintainers.
Of course, I'll be happy to fix anything you find broken with the
Vision Egg.

All I really need the GUI functions are for popping up a dialog box
for user
responses, doesn't necessarily have to be a GUI object.

I've written code that prompts the users for single keypresses, but nothing beyond that. ("Press L if you saw movement to the left, R if you saw movement to the right" kind of thing.) I suspect you want more...

Anyone have suggestions for libraries or code snippets for performing
these
kinds of functions (preferrably NOT GUI-related, as this seems to
bloat the code
substantially)?

PyUI (at http://pyui.sourceforge.net ) might fit your needs. I haven't used it, but the screenshots look great. I'd be happy help integrating that with the Vision Egg. (And would, regardless, be interested to hear if it works out.)

Cheers!
Andrew

Andrew D. Straw  Post-doctoral scholar
,-.              Dickinson Lab
\_/              California Institute of Technology
8||}             Mailcode 138-78
/ \              Pasadena CA 91125, USA
`-^
                 email:  astraw@xxxxxxxxxxx
                 office: +1 626 395 5828


====================================== The Vision Egg mailing list Archives: http://www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html

====================================== The Vision Egg mailing list Archives: http://www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html

Other related posts: