psychopy.org | Reference | Downloads | Github

Got a note to contact developers from builder loop error

I received this when I was trying to apply a “conditions” file to my loop in builder:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\openpyxl\reader\excel.py”, line 121, in _validate_archive
archive = ZipFile(filename, ‘r’, ZIP_DEFLATED)
File “C:\Program Files\PsychoPy\lib\zipfile.py”, line 1108, in init
self._RealGetContents()
File “C:\Program Files\PsychoPy\lib\zipfile.py”, line 1175, in _RealGetContents
raise BadZipFile(“File is not a zip file”)
zipfile.BadZipFile: File is not a zip file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\builder\dialogs_init_.py”, line 1455, in onBrowseTrialsFile
returnFieldNames=True)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\data\utils.py”, line 365, in importConditions
wb = load_workbook(filename=fileName, data_only=True)
File “C:\Program Files\PsychoPy\lib\site-packages\openpyxl\reader\excel.py”, line 174, in load_workbook
archive = _validate_archive(filename)
File “C:\Program Files\PsychoPy\lib\site-packages\openpyxl\reader\excel.py”, line 124, in _validate_archive
archive = ZipFile(f, ‘r’, ZIP_DEFLATED)
File “C:\Program Files\PsychoPy\lib\zipfile.py”, line 1108, in init
self._RealGetContents()
File “C:\Program Files\PsychoPy\lib\zipfile.py”, line 1175, in _RealGetContents
raise BadZipFile(“File is not a zip file”)
zipfile.BadZipFile: File is not a zip file

Looks like this is something to do with the file type - can you try saving the conditions as a .csv and load it in that way?

Becca

I tried with both .csv and .xlsx and unfortunately got the same message