Problem with reading correct answers from excel file in Pavlovia

Hello everyone,

I’m having a problem with reading the correct answers from an excel file in Pavlovia. I have created a digit span experiment using PsychoPy 2023.1.3 on Mac. The experiment consists of a series of questions that have multiple correct answers, such as [‘1’, ‘3’, ‘5’]. I have stored the correct answers in an excel file, and I use the store correct component to read them and compare them with the participant’s response.

The problem is that the experiment runs perfectly on my computer, but not on Pavlovia. On Pavlovia, it seems that the correct answers are not read correctly from the excel file. When I revised the excel file from [‘1’,‘3’,‘5’] to 1,3,5 the correct answer functions ran on Pavlovia. But this time, it didn’t work locally.

I have tried to use different delimiters for the correct answers, such as ; " () but none of them worked on both platforms.

Does anyone know how to solve this problem? I would appreciate any help or suggestions. Thank you for your time and attention. :blush:

Hello

AFAIK, the built-in correct value function only accepts a single correct value, not multiple correct values. So you have to write your own function to determine the correctness of the answer.

Best wishes Jens

Dear Jens,

Thank you for your reply. I appreciate your suggestion. However, just to clarify, the built-in correct value function in PsychoPy does indeed support multiple correct values using Python lists. So, it should ideally work with answers like [‘1’, ‘3’, ‘5’], as I have in my experiment script.

The strange part is that it functions correctly on my local machine but doesn’t seem to work as expected on Pavlovia. This inconsistency is what’s puzzling me. When I modified the Excel file without quote marks and brackets (1, 3, 5), it worked on Pavlovia but then stopped working locally. It’s quite perplexing.

I’ll certainly explore the option of writing a custom function to handle multiple correct values, as you suggested.

Thank you for your time and assistance.