Problem to synch to pavlovia

Hello,
I have been working on my study today and figuring out how to counterbalance the three tasks in my study. Once I finally figured it out this PsychoPy3 Error showed up every time I try to synch my study to Pavlovia:

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 ‘expInfo’ is not defined

During 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 1221, in onPavloviaSync
self.fileExport(htmlPath=htmlPath)
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 808, in findPathsInFile
filePath = eval(filePath)
File “”, line 1
C:\Users\Student\Documents\Uni 3rd Year\Dissattempt~$counterbalancing3.xlsx
^
SyntaxError: invalid syntax

I wrote my own code to try and counter balance the 3 tasks in the study and I am not sure if the issue is that as this error message only began after I added my code in but this is the code I wrote:
if ((expInfo’participant’] % 2)){
group = “1”;
} else:{
randNum = Math.floor(Math.random() *2)
if (randNum == 0){
group = ‘2’
} else {
group = ‘3’
}
}

It seems to work when I run it on Psychopy so I thought I wrote it correctly but now I am not so certain. (I’m extremely new to coding and don’t know much at all)
Thank you so much,
Victoria

Your code seems to have a Python: as well as a JavaScript {

In my crib sheet I recommend writing Python code in auto translate code components whenever possible.

Thank you so much, I thought that was probably the issue. woud you mind highlighting the bits which are in Java. I am very new to all this and I have no coding knowledge whatsoever! I have just been googling what I am trying to write but its not going very well :sweat_smile:
I’ve looked up two instruction videos on how to write the code I wanted to write and half of the code uses a video that I think used java and the other was one that was python!

If you type Python code into an auto translate code component then you’ll get an error on the JavaScript side if your Python code contains major errors.