psychopy.org | Reference | Downloads | Github

Syntax error rating scale

Hi everybody

I’m running Psychopy VS. 1.85.4 on OS High Sierra and used the Builder.

My experiment cointains videos with

  • a probe session where the correct answers should be stored

  • two sessions of rating on a rating scale 1-7

  • The Experiment per se runs fine. Probe session data is stored correctly.

However, I got the following error message when it comes to store the data of the rating scales.

File “/Users/Mac/Dropbox/GraffitiExp2/testversuch_vm_5_lastrun.py”, line 1217, in
dataOut=[‘n’,‘all_mean’,‘all_std’, ‘all_raw’])
File “/Users/lpzjwp/code/psychopy/git/psychopy/data/base.py”, line 325, in saveAsExcel
File “/Users/lpzjwp/code/psychopy/git/psychopy/data/trial.py”, line 447, in _createOutputArray
File “”, line 1
[(, 0.0), (2, 1.096), (2, 1.94)]
^
SyntaxError: invalid syntax
Exception RuntimeError: RuntimeError(‘sys.meta_path must be a list of import hooks’,) in <bound method ExperimentHandler.del of <psychopy.data.experiment.ExperimentHandler object at 0x112cf5d90>> ignored

Help would be appreciated.

Thank you

Vau

In the “Data” tab of your experiment’s settings, what happens when you switch off the “Save Excel file” and “Save csv file (summaries)” options?

Hi Michael

Thanks for your reply.
That worked… All data is stored in one sheet now. So I would have to use the .csv format only? Haven’t worked with that yet.

Vau

It is far preferable to do that. .csv is a standard text-based format that can be opened by anything (including Excel) and it doesn’t have the many disadvantages of using Excel-format files. Saving Excel files from psychoPy has performance issues but also your data gets separated across different tabs, which isn’t convenient for analysis.

Lastly, the summary format is best avoided: it’s better if you do any summaries yourself, as part of your analysis process.

Ok, I see. Thank you very much for your help and advice Michael!

Just to clarify, once you have imported an .csv into Excel, you’re free of course to save it from there into .xlsx format, which allows you to do extra things that plain csv doesn’t provide for.