| Reference | Downloads | Github

Issue with the tutorial

Hey guys Im new to python programming. I decided to start with the tutorial on the site. I wrote the code for the stimulus app and when I try to run it, I get an error about invalid syntax with the line for creating the window.

Create a window

mywin = visual.Window([800x600], monitor=“testmonitor”, units=“deg”)

My apologies if this is the wrong subforum. I wasnt entirely sure where to start.

Welcome along.

[800x600] is not valid Python syntax for a list of values. It should look like this: [800, 600]

The API documentation for that function is here:

Thank you. Maybe the tutorial on this site should be updated if this is incorrect.

Edit: Im now having trouble with this line

fixation = visual.GratingStim(win=mywin, size=0.5, pos=[0, 0], sf=0 rgb=-1)

It seems to be taking issue with the size syntax now.

Can you send me the link to the tutorial you’re referring to? I’ll probably be able to fix any errors you can find.

Seeing the exact error message would be useful. I can’t see anything wrong with the size parameter per se, but there should be a comma separating the sf and rgb arguments.

It just says invalid syntax with an arrow pointing up at the word size. I assumed that meant there’s an issue with that argument. I will double check about the comma though.

Edit: Sorry, I didn’t see the request for the link. I will get it for you.

Edit 2: Here is the link. it’s the first example. I forgot that I broke my install so I can’t get psychopy to open anymore. I’m planning to reinstall lubuntu with the 64bit version anyways.