| Reference | Downloads | Github

Can't generating PsychoJS

I made a simple demo of reaction with keyboard and mouse, but it could not generating into js.
the project is
the error as follow:

Generating PsychoJS script…
Traceback (most recent call last):
File “E:\psychopy\lib\site-packages\psychopy\app\builder\”, line 2437, in generateScript
psyexpCompile.compileScript(infile=self.exp, version=None, outfile=experimentPath)
File “E:\psychopy\lib\site-packages\psychopy\scripts\”, line 188, in compileScript
makeTarget(thisExp, outfile, targetOutput)
File “E:\psychopy\lib\site-packages\psychopy\scripts\”, line 160, in makeTarget
script = thisExp.writeScript(outfile, target=targetOutput, modular=True)
File “E:\psychopy\lib\site-packages\psychopy\”, line 216, in writeScript
localDateTime, modular)
File "E:\psychopy\lib\site-packages\psychopy\experiment\components\settings_init
.py", line 529, in writeInitCodeJS
File "E:\psychopy\lib\site-packages\psychopy\experiment\components\settings_init
.py", line 518, in prepareResourcesJS
resourceFiles = self.exp.getResourceFiles()
File “E:\psychopy\lib\site-packages\psychopy\”, line 817, in getResourceFiles
condsPaths = findPathsInFile(params[‘conditionsFile’].val)
File “E:\psychopy\lib\site-packages\psychopy\”, line 796, in findPathsInFile
conds = data.importConditions(thisFile[‘abs’]) # load the abs path
File “E:\psychopy\lib\site-packages\psychopy\data\”, line 276, in importConditions
trialsArr = pd.read_csv(fileName, encoding=‘utf-8-sig’)
File “E:\psychopy\lib\site-packages\pandas\io\”, line 678, in parser_f
return _read(filepath_or_buffer, kwds)
File “E:\psychopy\lib\site-packages\pandas\io\”, line 440, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File “E:\psychopy\lib\site-packages\pandas\io\”, line 787, in init
File “E:\psychopy\lib\site-packages\pandas\io\”, line 1014, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File “E:\psychopy\lib\site-packages\pandas\io\”, 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

Hi @pyl8128, not sure what the issue is exactly, but I believe it is related to a) the path of the conditions file, or b) the format of the conditions file. For a) try browsing to to location of the conditions file in the loop, and selecting the file so the correct path is given, b) try saving the conditions file as an “xlsx” file.

Thanks, ‘xls’ works well.