Unable to convert undefined to a number

Glad to hear it! its very tough when you are trying to rule out so many options.

Hello ndietze. Would you please elaborate on how you solves this issue? I am facing now the exact same situation that you described before: If I define the variables at the beginning of the experiment the error disappears but these values are then never replaced by the values from the condition file and stay as 0s forever.

Thank you

Hi quino,

do you have any empty cells in your condition files? Once I replaced mine with some numbers, the issue was resolved.

Best,
Nik

Thanks for your quick answer!

That is the upper part of my condition file. It looks like this until row 160 so no empty cells, except for the columns to the right of ā€œblockā€ and the rows under row 160 but I dont thnk this is what you mean, do you? It is a .xlsx file and I dont know if maybe I should try a different format. Do you know anything about this?

Thank you again

Your condition file seems fine and the format is also correct.
Did you manage to solve the issue?

Hi :). Unfortunately I did not and strangely, building the exact same experiment from scratch did not show that error. I assume that it had something to do with the fact that I updated Psychopy after the initial experiments were on Pavlovia (although I even reinstalled the version I had back then). Anyways, I did all the experiment again and it seems to be working now.

Thank you for your help.

Online you canā€™t modify variables set by spreadsheets. By using this solution you are overwriting your spreadsheet variables. You need to copy the values to new variables

So does that mean whatever the values are in the conditions files, these need to be copied into a variable in the code component?

Then this process will lead to the variables being defined in the javascript code and no longer leading to the error ā€˜unable to convert undefined to a numberā€™?

Only if you need to edit the value rather than just use it.

1 Like

Hi,

Iā€™m very late to the party but I was struggling a lot with this issue recently. I was using platform 22.2.2 and syncing with Pavlovia, and I noticed that the problem was fixed when I uploaded from a different computer using 22.2.1. Iā€™m not sure why, but thought Iā€™d share here if anybody happens to be having difficulty with this at the moment

1 Like