The browse option in the trial properties menu (when inserting a loop) is not reading .xlsx file

After selecting the xlsx file, the “properties” window doesn’t recognize the file at all.
I hope someone can help. Thanks a lot!

This dialog can sometimes get a bit confused. It seems to be trying to find a file called conditionsFile rather than the new one. Try opening the dialog, deleting any text from the Conditions field, and closing it again. Maybe save the file. Then re-open and browse to the new file.

Then try that a number of other ways until it works…? Let us know how you get on.

Thanks Michael! I don’t know what happened, but this morning it read the file! haha
Cheers!

Hey Michael. Unfortunately, I was wrong. I still can’t manage to make PsychoPy read my xlsx files. I even uninstalled the latest version of the software and replaced it with the previous one, in case it was a bug.
I follow this route:

Then click in “open”, and this is the result of that action:

Strangely enough, when I work on a Mac computer I don’t have a problem to browse for the conditions. However, after finishing designing my experiment in the Mac, I tried to open it again in my laptop and it wasn’t recognized. When I got back to try to open it in the Mac it didn’t work as well.

I hope there is some solution, though.

Thanks!

What about trying with a .csv file?

I just wanted to point out that, though this isn’t a solution to any bugs, you should be able to just type the name of the file into that line of the dialog. If the conditions file is in the same folder as the .psyexp file, you could just type “Conditions.xlsx” (no quotes) in the dialog. Have you tried that?

Thank you very much Michael! I manage to make it work :slight_smile:

Thank you also, Daniel. It is working well now :slight_smile:

I’m having the exact same problem! I’ve tried .xlsx and .csv but neither are working. When I hit the browse button next to “conditions,” I can see my files and click on them, but then nothing happens. The conditions area remains blank. I’ve also tried typing the file name in directly and hitting “okay,” but when I open the properties window back up again it just says, "No parameters set (conditionsFile not found). It’s my first time using psychopy and I downloaded the most recent version today. Does anyone know how to fix this? Thanks!

FYI: I’m using a macOS Sierra Version 10.12.6
I originally created the file in “numbers” and exported it to .xlsx and .csv

I know it’s an old thread but my students encountered the same problem with PsychPy v2020.1.3 today.
They open the loop dialog box, select the csv-file via Browse… butten, but nothing happens.
Typing the file name in the conditions field gives a red coloured comment ‘No parameters set (conditionsFile not found)’.

The Runner window gives the following messages:

> Traceback (most recent call last):
>   File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\dialogs\__init__.py", line 1575, in onBrowseTrialsFile
>     returnFieldNames=True)
>   File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\data\utils.py", line 305, in importConditions
>     sep=sep, dec=dec)
>   File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\data\utils.py", line 219, in _attemptImport
>     sep=sep, decimal=dec)
>   File "C:\Program Files\PsychoPy3\lib\site-packages\pandas\io\parsers.py", line 678, in parser_f
>     return _read(filepath_or_buffer, kwds)
>   File "C:\Program Files\PsychoPy3\lib\site-packages\pandas\io\parsers.py", line 440, in _read
>     parser = TextFileReader(filepath_or_buffer, **kwds)
>   File "C:\Program Files\PsychoPy3\lib\site-packages\pandas\io\parsers.py", line 787, in __init__
>     self._make_engine(self.engine)
>   File "C:\Program Files\PsychoPy3\lib\site-packages\pandas\io\parsers.py", line 1014, in _make_engine
>     self._engine = CParserWrapper(self.f, **self.options)
>   File "C:\Program Files\PsychoPy3\lib\site-packages\pandas\io\parsers.py", line 1708, in __init__
>     self._reader = parsers.TextReader(src, **kwds)
>   File "pandas\_libs\parsers.pyx", line 384, in pandas._libs.parsers.TextReader.__cinit__
>   File "pandas\_libs\parsers.pyx", line 697, in pandas._libs.parsers.TextReader._setup_parser_source
> OSError: Initializing from file failed

Interestingly, saving the csv-file as xlsx “solves” the problem (but working with Excel and German locale is awkward because of 3,14159 instead of 3.14159 and semicolon instead of comma as field seperator). Nevertheless, there must be some problem to be solved.

Yours - Sven

I met exact the same problem. I used to be able to read the excel file but now it doesn’t work. I try both the .xlsx file and the .csv file. Neither works. here is the error report:

Traceback (most recent call last):
File “D:\psychopy\lib\site-packages\psychopy\app\builder\dialogs_init_.py”, line 1455, in onBrowseTrialsFile
returnFieldNames=True)
File “D:\psychopy\lib\site-packages\psychopy\data\utils.py”, line 349, in importConditions
sep=sep, dec=dec)
File “D:\psychopy\lib\site-packages\psychopy\data\utils.py”, line 252, in _attemptImport
sep=sep, decimal=dec)
File “D:\psychopy\lib\site-packages\pandas\io\parsers.py”, line 678, in parser_f
return _read(filepath_or_buffer, kwds)
File “D:\psychopy\lib\site-packages\pandas\io\parsers.py”, line 440, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File “D:\psychopy\lib\site-packages\pandas\io\parsers.py”, line 787, in init
self._make_engine(self.engine)
File “D:\psychopy\lib\site-packages\pandas\io\parsers.py”, line 1014, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File “D:\psychopy\lib\site-packages\pandas\io\parsers.py”, line 1708, in init
self._reader = parsers.TextReader(src, **kwds)
File “pandas_libs\parsers.pyx”, line 384, in pandas._libs.parsers.TextReader.cinit
File “pandas_libs\parsers.pyx”, line 697, in pandas._libs.parsers.TextReader._setup_parser_source
OSError: Initializing from file failed

the error message appears only with the .csv file but not with the .xlsx file. When choose the .xlsx file, it waits and turns out blank. Could you please share how did you make it work? Thanks a lot.