Error message - problem with uploading a CSV file

I am trying to build a simple experiment but Psychopy is extremely slow and doesn’t run. I believe the problem is with the CSV file, but not sure what it is. Thank you.

I get this message:

Running: C:\Users\Dorits\Dropbox\PC\Desktop\My_folders\Experiments\Nameer\Perspective switching\perspective

1744.4271 EXP Imported experiment_file.csv as conditions, 154 conditions, 17 params
1744.4276 WARNING duplicate variable names: image, cue
1744.4310 INFO Loaded monitor calibration from [‘2021_10_07 12:55’]
1768.3175 EXP Imported experiment_file.csv as conditions, 154 conditions, 17 params
1768.3179 WARNING duplicate variable names: image, cue
pygame 1.9.6
Hello from the pygame community. Contribute - pygame wiki
C:\Program Files\PsychoPy\lib\site-packages\psychopy\data\ SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation:
trialsArr[col][row] = float(tryVal)

Experiment ended.

Hi There,

I think we might need a bit more info to understand the problem. Is it that PsychoPy in general is slow whilst you are building the task? or is it that the experiment is slow when you press run? Which csv file do you suspect to be problematic? is it a file your experiment is using or a data output file?


The first thing you should understand is that SettingWithCopyWarning is a warning, and not an error. The real problem behind the warning is that it is generally difficult to predict whether a view or a copy is returned. In most cases, the warning was raised because you have chained two indexing operations together. The SettingWithCopyWarning was created to flag “chained assignment” operations. This is made easier to spot because you might be used [] (square brackets) twice, but the same would be true if you used other access methods such as .loc[] , .iloc[] and so on.

Moreover, you can change the behaviour of SettingWithCopyWarning warning using pd.options.mode.chained_assignment with three option “None/raise”/“warn”.