I got: TypeError: Cannot assign to read only property 'undefined' of object '#'

URL of experiment: IB [PsychoPy]

Description of the problem: I’m working on writing my first task that loads data from csv files, and I’m running into this error on Pavlovia. I should note that the experiment works fine locally on Builder. I saw the two other solutions for this problem, but I don’t think my column header is empty so this should work. The reason I have the “index” column is because I do some preprocessing with Python.

CSV file:
image

Hi @SeanSteinle00,

It’s a bit hard to examine your issue as is, but here are some pointers that could help us help you:

Best, Thomas

You’ve shown a screenshot of your csv file which doesn’t convince me that the error isn’t due to a blank column. Please could you attach your actual csv file?

chooseBlock.csv (82 Bytes) block1.csv (93 Bytes)

Here are my CSVs! I only put block1 and chooseBlock because I can only upload two files. My experiment is two blocks with five trials in each.

Thomas,

Thanks for your suggestions. I’ll do my best to answer them here:
I got the error running the experiment in pilot mode on Pavlovia, right after my first message slide loaded. This should me that my blocking is fine (that’s where the text on my first slide comes from), but rather the problem is with the loading of the trial CSVs. The issue I got is in the title. I think the error is somehow in my CSVs, but my experiment worked locally so I’m not sure what’s going on!

Sean

Thanks! Can you tell me how I could get past the first slide?

What do you mean? I think it gets past the first slide because the chooseBlocks.csv loads correctly, but it fails when it has to load block1.csv.

I see an intro slide, then a face, then a grey screen, then nothing. But no matter, there is some problem somewhere, and to pinpoint it, it can be useful to first reduce your experiment to the minimal you need to trigger the error. Also, see tutorials I sent earlier, could help with debugging :slight_smile:

BTW, as far as I can tell the CSVs look OK.

Okay, I’ll take a look at those. Thanks so much!

You’re welcome. Good luck finding (and hopefully fixing) the issue!

I can’t see any issue with the csv files.

It might be that PsychoPy uses index as something else, so it might be worth changing that column name.

1 Like

Wow… you have a great intuition! I should have definitely thought of that. I changed index to images_index and it worked like a charm!

Thanks. I’ll add index to the avoid list I’m building on my crib sheet

Variable names to avoid are: core, Object, Length, Number, round, sound, Symbol, t, thisTrial, trials, util, visual.

2 Likes

This bug turned had a nice little spinoff then :), chapeau!

1 Like