Cedrus component attributeerror: 'nonetype' object has no attribute 'corr'

OS (Win10):
PsychoPy version (2021.1.4):
**Standard Standalone? (y)
What are you trying to achieve?:
I am using Builder and the included Cedrus component. The “store correct” option is enabled.
The experiment consists of a few tasks. Within each task, there are repeats of the same trial, ie they are built as looped routines.

The experiment works well, except when there is no response given (ie, no Cedrus key is pressed) in the first instance of the trial.

When there is no response in the first trial, PsychoPy would exit with the error
“…pyxid_impl.py”, line 371, in getattr
return getattr(self._impl, attrname)
AttributeError: ‘NoneType’ object has no attribute ‘corr’

However, if there is a response in the first trial, the experiment would continue even when there are no responses in subsequent trials.

What did you try to make it work?:
I tried unchecking the “store correct” box. It did not prevent the error.

What can I do to bypass this problem? If this is not fixed, I run the risk that participants will have to repeat previous tasks because they fail to press a button in the first trial of the last task.

Hi There,

Please could you share your experiment file here? that sounds like a bug.

Thanks,
Becca

Tasks123temp.psyexp (140.2 KB)
Hi, Becca
This is the file.
Thank you
Yeow

Great thanks - I assume you hit this error in the r_Trial routine? where the trial ends at a set time rather than on a button press? I suspect this is a bug, a couple of Qs:

  1. When you tried unchecking the “store correct” option - did you also clear the “Correct answer” field? (i.e. so that it did not read “corrButton” ?
  2. If unchecking the store correct does not work what happens if you delete this cedrus component and make a fresh one?
  3. If the above works - what happens if you add a code component and in the end routine tab type print(buttonBox_Trial.keys)?

Thanks!
Becca

Hi, Becca
Thank you for your fast turnaround.
Yes. The problem is in the r_Trial routine.

  1. Yes, I had tried unchecking the “store correct” option. The error occurs with both an empty “Correct answer” field and with the variable “corrButton”.
  2. Same error with a new component
  3. (2) did not work. The error occurs before anything is printed. However, after the first trial, square brackets are printed when there is no response.

It looks like the error is generated by this statement in the end routine tab of the code component in r_Trial:
if buttonBox_Trial.corr: