TypeError: _ is undefined when running OSWEB
I get this error "TypeError: _ is undefined" when I run my epxeriment in the web browser (firefox)
I get all this in console
[2021-02-04 13:49:56,995:process:153:INFO] Starting experiment as ExperimentProcess-5
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
[2021-02-04 13:49:58,576:psycho:146:INFO] waitblanking = True
[2021-02-04 13:49:58,576:psycho:147:INFO] monitor = testMonitor
[2021-02-04 13:49:58,576:psycho:148:INFO] screen = 0
[2021-02-04 13:50:00,070:experiment:464:INFO] experiment started
[2021-02-04 13:50:00,070:experiment:468:INFO] disabling garbage collection
C:\Program Files (x86)\OpenSesame\Lib\site-packages\js2py\constructors\time_helpers.py:11: UserWarning: Please install or fix tzlocal library (pip install tzlocal) in order to make Date object work better. Otherwise I will assume DST is in effect all the time
'Please install or fix tzlocal library (pip install tzlocal) in order to make Date object work better. Otherwise I will assume DST is in effect all the time'
[2021-02-04 13:50:00,354:psycho:107:WARNING] Canvas.show() took 22.274899994954467 ms
[2021-02-04 13:50:03,119:psycho:107:WARNING] Canvas.show() took 21.287700001266785 ms
[2021-02-04 13:50:28,795:psycho:107:WARNING] Canvas.show() took 16.852400003699586 ms
[2021-02-04 13:50:41,057:psycho:107:WARNING] Canvas.show() took 20.375899999635294 ms
[2021-02-04 13:50:53,920:psycho:107:WARNING] Canvas.show() took 20.213600000715815 ms
[2021-02-04 13:51:00,260:psycho:107:WARNING] Canvas.show() took 18.970599994645454 ms
[2021-02-04 13:51:05,747:experiment:476:INFO] experiment finished
[2021-02-04 13:51:05,766:experiment:552:INFO] enabling garbage collection
[2021-02-04 13:51:05,776:process:159:INFO] experiment finished!
Any tips?
Many Thanks
Deiniol
Comments
So your experiment is working in OpenSesame but not in the browser?
In the browser, look for the javascript console (might be under developer tools) to see what is happening there. You can print messages to the console by using: console.log('Your message');
If you place such messages at strategic points in your code you can see at what point the error occurs and maybe get a better idea of what's wrong.
Hi @Skilli ,
An obvious question perhaps, but did you put the PNG file(s) in the filepool?
Otherwise, could you copy the console information here, like @JasperdeWaard suggests?
(On a side note: I would set the duration of the feedback item to 0, since you're collecting a keyboard response right after it. Otherwise for the participant it feels like their keyboard press has no effect...)
Cheers,
Lotje
Did you like my answer? Feel free to
Doh. I had not added the png files to the pool. Thanks @lvanderlinden and @JasperdeWaard .
The support on this forum is amazing. Becasue of covid lockdown, I've had to create more experiemnts for my undergrad students to run online and I couldn't have done it without this forum.
Many thanks/diolch yn fawr
Deiniol
Hi Deiniol,
Good to hear!
And it's very nice to have you on the forum. Seems like you are making much progress in a short time. :)
Cheers,
Lotje
Did you like my answer? Feel free to
I've noticed now, across different versions of OS, that the filepool is sometimes suddenly empty, while I'm sure that I didn't empty it, and I also didn't move any files around. It's hard to reproduce the bug though, since I really can't tell when it happens.
I'm now on the latest version btw, and it just happened again.