Can't loop through external files
Hi,
I'm running into problems when I try to use external files (.csv or .xlsx) as a source for a loop in OpenSesame. As long as I enter the same information manually into a table everything works fine, but whenever I refer to an external file as a source for the loop OpenSesame crashes and gives me the exception message " new-line character seen in unquoted field - do you need to open the file in universal-newline mode?".
The table does not contain any of the character sequences normally used as new-line characters ('\n', '\r' or '\r\n').
I have to admit that I didn't fully understand the requirements for .csv-files (plain-text, comma-separated, double-quoted, UTF-8 encoded). As far as I can tell the file is plain-text, comma-separated and UTF-8 encoded but what does double-quoted mean? I used double quotes as text delimiter. Is that what is meant? Unfortunately, I have no experience with inline scripting in python (and very little experience with scripting in general).
Can anyone help me out? Reading in external tables would save me many, many hours of work.
Comments
Hi,
This is a bug with Mac OS line endings. It's already fixed in
datamatrix0.3.2, a sub-package of OpenSesame, but not included in the latest release of OpenSesame. You can updatedatamatrixby entering the following the debug window (on two separate lines):If the upgrade went well, you should see
0.3.2printed out to the debug window.For more information about using
pip, see:Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
That worked!
(Sorry, I forgot to mention that I'm using Mac OS.)
Thank you so much, this feature makes life so much easier if you want to use a separate list for each subject!
Cheers,
Sophia
Good to hear that you got things working!
Check out SigmundAI.eu for our OpenSesame AI assistant!