URL of experiment:
Description of the problem:
Hi!
I try to run my experiment online, so at first I tried to export HTML but it seems unsuccessful,the alert is as follows
“Alert 4210:JavaScript Syntax Error in ‘Begin JS Experiment’ tab. See ‘Line 12: Unexpected token’ in the ‘Begin JS Experiment’ tab.
For further info see 4210: Probable syntax error detected in your JavaScript code — PsychoPy v2021.1”
My code in ‘Begin JS Experiment’ tab as show below:
import psychopy.voicekey as vk
vk.pyo_init(rate=44100, buffersize=32)
from psychopy.voicekey.demo_vks import DemoVoiceKeySignal as Signaler
Stim_list=[‘images\PracticeSingular.xlsx’,‘images\PracticePlurals.xlsx’,
‘images\Set1Plurals_B1L1.xlsx’,‘images\Set2Plurals_B1L1.xlsx’,
‘images\Set1Singular_B1L1.xlsx’,‘images\Set2Singular_B1L1.xlsx’,
‘images\Set1Plurals_B1L2.xlsx’,‘images\Set2Plurals_B1L2.xlsx’,
‘images\Set1Singular_B1L2.xlsx’,‘images\Set2Singular_B1L2.xlsx’,
‘images\Set1Plurals_M1.xlsx’,‘images\Set2Plurals_M1.xlsx’,
‘images\Set1Singular_M1.xlsx’,‘images\Set2Singular_M1.xlsx’,
‘images\Set1Plurals_M2.xlsx’,‘images\Set2Plurals_M2.xlsx’,
‘images\Set1Singular_M2.xlsx’,‘images\Set2Singular_M2.xlsx’,
‘images\Set1Plurals_B2L2.xlsx’,‘images\Set2Plurals_B2L2.xlsx’,
‘images\Set1Singular_B2L2.xlsx’,‘images\Set2Singular_B2L2.xlsx’,
‘images\Set1Plurals_B2L1.xlsx’,‘images\Set2Plurals_B2L1.xlsx’,
‘images\Set1Singular_B2L1.xlsx’,‘images\Set2Singular_B2L1.xlsx’,]
index_list = [0] * 26
index_dic = dict(zip(Stim_list, index_list))
pic = [list(range(3))*2,list(range(3))*1,
list(range(12))*1,list(range(12))*1,
list(range(12))*1,list(range(12))*1,
list(range(12))*1,list(range(12))*1,
list(range(12))*1,list(range(12))*1,
list(range(12))*4,list(range(12))*4,
list(range(12))*4,list(range(12))*4,
list(range(12))*4,list(range(12))*4,
list(range(12))*4,list(range(12))*4,
list(range(12))*1,list(range(12))*1,
list(range(12))*1,list(range(12))*1,
list(range(12))*1,list(range(12))*1,
list(range(12))*1,list(range(12))*1,]
[shuffle(i) for i in pic]
pic_dic = dict(zip(Stim_list,pic))
I am a new psychopy learner, and I don’t know what the syntax error is. I’ll appreciate it very much if you can help me. Many thanks!