Defining an object (win) using visual.Window() gives a gray screen (psychopy not responding)

125 views
Skip to first unread message

Martin Petri Bagger

unread,
Sep 24, 2013, 8:00:05 AM9/24/13
to psychop...@googlegroups.com
Hi

I am running psychopy from Canopy (32-bit) on a Windows 7 computer. 
Psychopy starts and crashes (not responding) when I try to run a script (which is not finished yet). 

The following is what makes it crash:

from psychopy import visual, event, core, data, gui


win = visual.Window(size=(1920,1200), units='pix')


I don't understand why anything happens, as I only define the object win, but I do not do anything else.

Has anyone got a good explanation?

Cheers,
Martin

Jeremy Gray

unread,
Sep 26, 2013, 12:04:56 PM9/26/13
to psychop...@googlegroups.com
alas, I don't have any explanation at all, let alone a good explanation. it works for me with Canopy. maybe try even more minimal: win = visual.Window()



--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/d774b41d-292c-47c3-86cd-3bfc1e6dc5e2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Martin Petri Bagger

unread,
Sep 27, 2013, 3:11:54 AM9/27/13
to psychop...@googlegroups.com
Hi Jeremy, the minimal version gives me the same problem. Hmm 

Martin Petri Bagger

unread,
Sep 27, 2013, 3:15:43 AM9/27/13
to psychop...@googlegroups.com
Can you tell me, what Kernel options do you use? (not that it should have any effect)

Best,
Martin


Den torsdag den 26. september 2013 18.04.56 UTC+2 skrev Jeremy:

Jeremy Gray

unread,
Sep 27, 2013, 6:33:35 PM9/27/13
to psychop...@googlegroups.com
I use a mac, and am not even sure what "Kernel options" means in this context.


Torge

unread,
Apr 22, 2014, 3:55:46 PM4/22/14
to psychop...@googlegroups.com
Hi,

I'm having the same problem using PsychoPy 1.80.02 Builder View both on Linux (Kubuntu 14.04) and Windows 7, both 64 bit.

If I include
win = visual.Window()
in the code, PsychoPy only shows a gray screen. On Windows, the mouse cursor is shown after about a second.

Have you found a solution for this?

Best
Torge

Jonathan Peirce

unread,
Apr 23, 2014, 4:36:36 AM4/23/14
to psychop...@googlegroups.com
You're using Builder view, but you're including a line of code to create an extra window?
I don't understand. What are you aiming to do here?

Jon
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.

Torge

unread,
Apr 23, 2014, 2:26:49 PM4/23/14
to psychop...@googlegroups.com
Hi Jon,

thanks for your reply!
It was part of a code bit for preloading images which I found here and wanted to use, but now I know why it's not necessary in my case (Builder). Sorry for the confusing question!

Joshua Peterson

unread,
Apr 23, 2014, 2:37:24 PM4/23/14
to psychop...@googlegroups.com
I am a bit confused about the question. What is the error on crash? For me, defining the win object creates a blank grey window immediately. You don't have to say something like win.show(). The window launches automatically upon creation. If you want more control, you will have to use something like pygame.display, which comes with PsychoPy. If you aren't listening for the ESC key (to then execute win.close()), you can't get out of the window. On Windows, this means you have to kill the process manually.

It would probably be helpful to see what context this code is in. Can you attached the entire experiment?
Reply all
Reply to author
Forward
0 new messages