psychopy 2020.2.10
Hello all,
I’m building a JS experiment with the builder.
For the loop file, I’ve set
‘condition’ + $expInfo[‘condition’] +‘.xlsx’
In experiment settings, I’ve got condition there.
but when I export html, I get following error messages:
Traceback (most recent call last):
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 719, in fileExport*
- target=“PsychoJS”)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 73, in generateScript*
- compileScript(infile=exp, version=None, outfile=filename)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 242, in compileScript*
- _makeTarget(thisExp, outfile, targetOutput)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 214, in _makeTarget*
- script = thisExp.writeScript(outfile, target=targetOutput, modular=True)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 223, in writeScript*
- self_copy.flow.writeFlowSchedulerJS(script)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\flow.py”, line 289, in writeFlowSchedulerJS*
- resourceFiles = set([resource[‘rel’].replace(“\”, “/”) for resource in self.exp.getResourceFiles()])*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 856, in getResourceFiles*
- condsPaths = findPathsInFile(params[‘conditionsFile’].val)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 808, in findPathsInFile*
- filePath = eval(filePath)*
- File “”, line 1*
- ‘condition’ + $expInfo[‘condition’] +‘.xlsx’*
^*
SyntaxError: invalid syntax
the porblem is very similar to
NameError: name not defined (even though it was defined earlier) - Online experiments - PsychoPy
but the solution doesn’t work for me…
I’ve tried to use a single variable for the loop file defintion, which was coded like below
but there still comes error msg:
Traceback (most recent call last):
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 808, in findPathsInFile*
- filePath = eval(filePath)*
- File “”, line 1, in *
NameError: name ‘usecsv’ is not definedDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 719, in fileExport*
- target=“PsychoJS”)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 73, in generateScript*
- compileScript(infile=exp, version=None, outfile=filename)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 242, in compileScript*
- _makeTarget(thisExp, outfile, targetOutput)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 214, in _makeTarget*
- script = thisExp.writeScript(outfile, target=targetOutput, modular=True)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 223, in writeScript*
- self_copy.flow.writeFlowSchedulerJS(script)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment\flow.py”, line 289, in writeFlowSchedulerJS*
- resourceFiles = set([resource[‘rel’].replace(“\”, “/”) for resource in self.exp.getResourceFiles()])*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 856, in getResourceFiles*
- condsPaths = findPathsInFile(params[‘conditionsFile’].val)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 822, in findPathsInFile*
- files.extend(findPathsInFile(str(condFile)))*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\experiment_experiment.py”, line 839, in findPathsInFile*
- conds = data.importConditions(thisFile[‘abs’]) # load the abs path*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\data\utils.py”, line 333, in importConditions*
- sep=sep, dec=dec)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\data\utils.py”, line 247, 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 446, in _read*
- data = parser.read(nrows)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\pandas\io\parsers.py”, line 1036, in read*
- ret = self._engine.read(nrows)*
- File “C:\Program Files\PsychoPy3\lib\site-packages\pandas\io\parsers.py”, line 1848, in read*
- data = self._reader.read(nrows)*
- File “pandas_libs\parsers.pyx”, line 876, in pandas._libs.parsers.TextReader.read*
- File “pandas_libs\parsers.pyx”, line 891, in pandas._libs.parsers.TextReader._read_low_memory*
- File “pandas_libs\parsers.pyx”, line 945, in pandas._libs.parsers.TextReader._read_rows*
- File “pandas_libs\parsers.pyx”, line 932, in pandas._libs.parsers.TextReader._tokenize_rows*
- File “pandas_libs\parsers.pyx”, line 2112, in pandas._libs.parsers.raise_parser_error*
pandas.errors.ParserError: Error tokenizing data. C error: EOF inside string starting at line 45
It would be really nice if someone could tell what’s wrong with my experiment
much much thx in advance!
Best
PJ