Issue with setting Correct Answer in keyboard component: $ not working anymore

I couldn’t find any existing posts about this (apologies if I missed them), so hoping someone can help.

After updating to PsychoPy v2025.2.4 (on a MacBook), I’ve experienced two issues in running studies made in Builder on Pavlovia. These studies were were working totally fine up until mid-December (before updating).

The main issue I’m experiencing now concerns the correct answer field in the keyboard component. The way I previously set correct answers in the keyboard component no longer works (using the dollar sign). I’ve tried with and without the dollar sign ($correctAns), and with added quotes, but none of the combinations I used to use are working. The PsychoPy documentation still suggests using $ to reference a variable, so I’m not sure if something changed in the update and I missed it.

A minor issue concerns quotation marks in text component. When adding quoted text in the text component (e.g. press “x”), I’m now being forced to add a slash symbol before the quote marks (\"). However, the slash then shows up visibly when the study runs, which is not ideal.

Has anyone else experienced either of these after the update? Any help would be much appreciated.

Hello @gjd8009

Which part is not working specifically? Is there no column in the data file reflecting the correct and incorrect answers? Does the implemented feedback not work?

Best wishes Jens

Hi, thank you very much for your reply. No, it looks like the issue is related to the new psychopy version builder: it says $CorrectAns “should be set to update” (that’s the message in red shown in the builder, please see attached screenshot) but nowhere in the builder you can set variable to update, there is no dropdown options as in the allowed keys. This morning I tried to modify the psyexp file myself directly. I found that indeed the CorrectAns variable is set to “constant” (which I guess was working fine in 2024 version but not anymore?), as such: “Param val=“$correctAns” valType=“str” updates=“constant” name=“correctAns”/ “ . I changed updates from “constant” to “set to repeat” for every single variable in my psyexp file, reopened the file in psychopy, and now it works. I guess this hardcoded solution is not really ideal tho :confused: I wonder if other people are experiencing the same issue with this new version? Maybe it’s due to opening the scripts I made in the 2024 version with the new one, but setting the earlier version (2024.2.4) in the builder still shows same error and on top of that, it does not let me synch.

Just noticed I am now also getting an error in the Quest staircase properties, in the Nreps field, which previously I filled as 100, maxTrials: 100 (and this was also working fine in 2024 version). In the current version it now shows a red error message : Python syntax error field ‘nReps’: only single target (not tuple) can be annotated (, line 1). The issue with this is that without maxTrials the staircase keeps going on forever online. Would there be any solution to this?

This is a hint, not an error and I agree that it shouldn’t be there, since there isn’t an option to have Correct answer as constant. I can’t comment on staircases.

Hello @gjd8009

You don’t explain how correct answer doesn’t work. What do you expect it to do?

Best wishes Jens