Code not working in new Psychopy version

Hello everyone

In previous Psychopy versions, I used the following code to alert participants if they answered a comprehension question wrongly, but in the new version (2024.2.3), the code does not work anymore. I’d appereciate if you could help with this.

if Question_resp.corr == 1:
continueRoutine = False

Best wishes,
Mohammad Hesam

What tab is that code in?

I’m assuming Begin Routine of the routine following the one with Question_resp

Try some print statements to help debug.

E.g. prinr("keys/corr", Question_resp.keys, Question_resp.corr)

1 Like

You’re right. The code is in Begin Routine Tab.

Should I create a seperate code componant for print statements like the following video?

I forgot to tell you that the code works locally. The problem I have is with Pavlovia.

Thanks

Thanks for the video. Three issues:

  1. I made a typo. It should be print not prinr
  2. The code was Python. Please use an auto translate code component.
  3. Please put the code in Begin Routine, not Begin Experiment.

This page gives more information about developer tools

https://psychopy.org/online/psychoJSCodingDebugging.html

1 Like