I am having some problems with text contained in a conditions file being converted into date format in PsychoPy’s output csv file. I have tried finding solutions online, but haven’t found one yet that solved the problem. Any help here would be much appreciated!
OS: Win 10
PsychoPy version: 2022.2.5
Standard Standalone? (y/n) : y
What are you trying to achieve?:
I am using an Excel spreadsheet as a conditions file to define some text that should be displayed on screen during the experiment using a text component, as this changes trial by trial. This works all fine. But when I look at the output csv file that is automatically saved, the text from the original Excel file is converted into date format in the output file.
What did you try to make it work?:
In the conditions file itself, I have defined the column type as text and I have also added an apostrophe at the beginning of each cell to indicate that Excel should treat this as text. For example, one cell contains '2 - 3, or another one contains '7 - 9 - 1. During the experiment PsychoPy correctly displays that text as 2 - 3 or 7 - 9 - 1 on screen.
I have also tried converting the Excel file into a csv file beforehand that is then used during the experiment, but the result is the same (i.e. no difference in the output file whether the original conditions file is used as .xlsx or as a .csv in the experiment).
What specifically went wrong when you tried that?:
The csv output file converts the original 2 - 3 into date format, so it now reads 02-Mar (or 02/03/2023) and the 7 - 9 - 1 is turned into 07/09/2001. I can’t just convert it into text as the actual underlying value was changed (i.e. 44987 for 02/03 and 37141 for 07/09). The problem only exists when the cell contains two or three numbers, not when it contains four plus numbers (e.g., 2 - 5 - 1 - 9 - 6 is not converted).
Any advice on how to fix this would be really helpful!