TypeError: Cannot read property '_gui' of undefined --> when attempting to run online

URL of experiment: https://pavlovia.org/K.Salehi/list-superc-2020

Description of the problem:
Hello,
I designed this experiment that runs fine on psychopy builder, however I keep getting this error ( * TypeError: Cannot read property ‘_gui’ of undefined) when I run online. Anybody knows what the problem might be?
I’m running on windows10 and psychopy version 2020.2.4
thanks!

Hey @KSal, as it happens your rloc, lloc, cloc variables are undeclared when you pass them on to setPos(), could you try initialising those using some kind of a numerical value? Does that change anything? x

Thanks for the quick reply!

I don’t know if I completely understand what intialising would entail.

However, if it could be insightful, those variables are columns in my excel file with differing location (ex:[-0.5, 0] ) at every row.

No problem, as it happens being able to parse array looking trial data like ‘[0, 0.8]’ is a relatively new addition to PsychoJS that is temporarily disabled on Pavlovia’s servers. I have now added the relevant bits in my fork, are you OK copying those changes over to your repo? Here to help, s.

Hi, sorry for the delay.
Of course, thanks for the modification. So if I’m understanding correctly, currently the format of my locations is preventing the experiment to run online. Can it be resolved with changing my location units to something more accurate?
Ultimately, my goal was to have specific locations so that the stimuli (2 or 3 depending on the trial) would all appear in the center conjointly.
Thank you again for your insight, I greatly appreciate your help!

No problem @KSal, apologies for the late reply. Not really a matter of accuracy in this case, but I’m hoping we can have a permanent fix issued on Pavlovia fairly soon, s.

Same here, thanks for your help!

Dear @KSal,

I have just updated the library. As far as I can tell, your experiment is now running.
Could you also check on your end and let us know?
Thank you again for your patience!
Best wishes,

Alain

1 Like

Yes it now runs on my end as well. However, the issue seems to be that the position of my textstim vary by trial and PsychoJS I think isn’t retrieving or converting the position that I set within my csv file. My goal is to have the texstimuli to appear in the middle of the screen (which works when I run locally).

Yes I understand, let me see if I can help with that, s.

I appreciate your help a lot! I figured that instead of having the location of every textstim coded in my csv file, I would instead create a textstim at every position that would a target might appear at a given trial. Therefore, I would separate my stimuli within my csv file into different columns and link them to the corresponding location of the textstim.
I don’t know if I’m explaining this clearly. However, I have hope of resolving this very soon!
Thanks again. -K

No problem, thanks for breaking it down for me, I think I get it now and should have an answer for you before too long, x

Hey @KSal, thanks for holding. OK I’ve edited the begin trial and each frame blocks in your .psyexp to accommodate for better alignment around the centre mark regardless of whether there are two or three words on display, but ignoring the .xlsx sourced location variables. Those only apply to the desktop version of the experiment. Hope that makes sense, please let me know if you need more details. Thanks, x

Hi @sotiri,
It looks perfect. Thanks a lot for your help, I appreciate it very much!
Best K.

1 Like

Hi @sotiri,
I downloaded the version you modified to add a practiceloop and remove the blocks for one bigger loop with a rest component. It runs fine locally, but does not seems to be stuck on initialising when I go to run it online.
I don’t know if you can shed any light on the problem.
Best, K.

Hi @KSal, OK let me check, could you give me developer access to the repo? Thanks, s.

Hi @sotiri, yes of course, I granted you access. Thank you, K

OK great, thanks. As it happens there used to be a bug with TextBox tripping when you gave it an empty default value in PsychoPy, text_9 in this case. You could try inserting a space instead of leaving it blank, or download the latest version 2020.2.6. Please check out the following thread for more details:

Thanks! Adding a space to that textstim solved the problem.
Now, I took your js code from each frame and adapted it to the practice loop and when I run the experiment online I have an error (reference error: text_17X not defined). This only occurs when text_17 contains a stimuli other than “.” and the program isn’t retrieving the Xposition from my conditions file.
Is it possible that I mistakenly editted the code? Thanks, K.

Hi @KSal, yes your current script is missing a few key bits from my fork, you would need to go back and add those in to make it work. Also, as explained above positioning text stimuli in the online version is works best independent of .xlsx variables, x