psychopy.org | Reference | Downloads | Github

Syntax error ISI.tStop = ISI.tStart + # record stop time ^ SyntaxError: invalid syntax

Hello everyone,

I have set up an experiment which works well online but which I cannot run locally. When I run my experiment in the Builder, I get the following syntax error, and I have no idea what it means or how I could solve it.

ISI.tStop = ISI.tStart + # record stop time

SyntaxError: invalid syntax

Does anyone have leads ? I am putting my experiment and my lastrun file (the code above is found one lin 780).

DM_in-person_Full_Likert_Larne_lastrun.py (94.0 KB)
DM_in-person_Full_Likert_Larne.psyexp (362.2 KB)
DM_in-person_Full_Likert_Larne.py (94.0 KB)

All the best,

Cameron

Hello,

you have an extra + following ISI.tStop = ISI.tStart What do you want to add?

Best wishes Jens

1 Like

Hello Jens,

Well, I’m not sure what I want to add, because I don’t know what this code corresponds too. I guess I’d like anything that would solve the syntax error and allow me to run my experiment as intended. I did not write this code so I am not sure how it came to be incomplete like this. Or is the + unnecessary?

All the best,

Cameron

Hello Cameron

well, I do not know what you intend to do and whether it would be necessary to add something. Perhaps you should ask the person who wrote the code. But the code you provided does not work.

Best wishes Jens

1 Like

Hello Jens,

The entire experiment has been made by me using PsychoPy. I think I may have a problem in the Builder where I used a key response routine. There is a red background in the routine and I can’t figure out what’s wrong because the specifications of my key response are the same as elsewhere :

All the best, Cameron

Hello Cameron,

the red background is a static ISI-component. Simply right-click on the red component and select remove.

BTW, I see a lot of routines which are probably similar (Likert1, Likert1b aso.). It is often better to reuse a routine and simply change, for instance, the text that you want to display.

Best wishes Jens

1 Like

Hello Jens,

Yes, I just removed the ISI component and everything works now. I must have added this ISI component by mistake and I didn’t know that this red screen was it. Silly me! Thanks a lot for your help.