Error syncing project to Pavlovia

URL of experiment: NA

Description of the problem: I’m having issues troubleshooting this as the lines of code being referred to in the error message are to files other than my experiment.
I have a fully working offline experiment in PsychoPy. When I try to sync it or run it on Pavlovia I’m met with the error below. It seems to be pointing to a list index out of range, but I cannot determine what it is referring to. Any assistance would be appreciated.

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\experiment\py2js_transpiler.py”, line 591, in translatePythonToJavaScript
transformedPsychoJsCode = transformPsychoJsCode(psychoJsCode, addons, namespace=namespace)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\experiment\py2js_transpiler.py”, line 512, in transformPsychoJsCode
if lines[0].find(‘var _pj;’) == 0:
IndexError: list index out of range

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\builder.py”, line 1445, in onPavloviaSync
self.fileExport(htmlPath=htmlPath)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\builder\builder.py”, line 846, in fileExport
exportPath = self.generateScript(experimentPath=exportPath,
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 91, in generateScript
compileScript(infile=exp, version=None, outfile=filename)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 229, in compileScript
_makeTarget(thisExp, outfile, targetOutput)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 202, in _makeTarget
script = thisExp.writeScript(outfile, target=targetOutput, modular=True)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\experiment_experiment.py”, line 396, in writeScript
self_copy.currentRoutine.writeEachFrameCodeJS(script, modular)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\experiment\routines_base.py”, line 630, in writeEachFrameCodeJS
comp.writeFrameCodeJS(buff)
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\experiment\components\button_init
.py", line 364, in writeFrameCodeJS
callback = translatePythonToJavaScript(str(callback))
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\experiment\py2js_transpiler.py”, line 593, in translatePythonToJavaScript
raise Exception('unable to transform the PsychoJS JavaScript code: ’ + str(error))
Exception: unable to transform the PsychoJS JavaScript code: list index out of range