Pavlovia - initialising experiment

Dear all,
I’m trying to connect PsychoPy(2020.2.5v) experiment to Pavlovia.
But it seems to have an issue with ‘initialising the experiment…’ (It worked well on local environment).

I saw some topics related to this issue here, but most of them were very specific coding problem.
This is the first project I’ve ever made with the computer language, so unfortunately it’s very tricky to see where to start and how to fix this problem.

Do you have any idea? Thank you for the help in advance.

Sincerely,
Conan

I had a smililar issue before. Go to settings and change ‘use psychopy version’ to 2020.2.4.
Hope this sovles your problem.

Stella

Have you looked at the browser console for an error message? Please check my crib sheet (pinned post) for more details.

Is there something you’ve found that is broken in 2020.2.5 that works in 2020.2.4?

Hi Stella, thanks for your answer :slight_smile:

Unfortunately the issue remains unresolved.
I changed the Experiment Setting -> Use PsychoPy version to 2020.2.4. and made Sync with the web project, but it’s still stuck in ‘initialising the experiment…’ page.

I’m going to share the solution here as soon as I fix this problem.
Thanks again!

Conan

Oh thank you so much. I saw your document(the crib sheet) and it’s very helpful to newbies like myself.
Maybe I can ask more specifically after reading your article.

Conan

Well I checked the browser(chrome) console, and it seems to be a syntax error

I think that line 333 of the JS file (you can click on the link) will be a text element where you have set it as empty. Try setting any empty text components as a space instead.

Hi @wakecarter ,

I added a space in the text input element as you recommended and finally it works. Thanks a lot :+1:

But another issue came up; it’s about file load error(image file named ‘4.jpg’), but there’s no difference with the other file sources in their filename extension, size, and everything.

I am afraid that I didn’t get that figured, only arriving at a work-able version.

I vaguely have a recollection of file names which are just digits causing issues. Try calling it p4.jpg.

Was it being downloaded in code? If so, please show the code.

Thanks for sharing! And I found (in some cases) this message randomly appears

I uploaded the full js code as attached file.
PrefRev_cond1_cs_js.csv (108.3 KB)

The problematic component is the routine named ‘P0_Question2’(line 384).

I guess I defined and made path in line 131 {‘name’: ‘stims/4.jpg’, ‘path’: ‘stims/4.jpg’},
and download in line 389.

image_p0_question2 = new visual.ImageStim({
win : psychoJS.window,
name : ‘image_p0_question2’, units : undefined,
image : ‘stims/4.jpg’, mask : undefined,
ori : 0, pos : [0, 0], size : ImgSize,
color : new util.Color([1, 1, 1]), opacity : 1,
flipHoriz : false, flipVert : false,
texRes : 128, interpolate : true, depth : 0.0
});

Are you using Settings/Online/Additional Resources to try to make sure that your image files are available?

This morning I ran into problems with this because the tool insisted on adding …/ to the path, which would have been correct if the experiment was running from the html folder. However, since it was running from the root (I think the default has changed in recent versions or I accidentally deleted it once and it has now propagated across loads of my experiments). The only way I managed to solve the issue was by switching the output path to html and then copying the resources (two video files in my case) to html/resources. It was a frustrating hour because I tried switching it several times (deactivating and reactivating the experiment each time)

Hi wakecarter, thanks for revisiting this issue and I admire your heavy efforts.

I’m not sure that I fully understand your comments including path assignment(local → online resources), but in my case I used basic setting from Pavlovia without changing.

Maybe it’s about the filename extension within the source. I realized when using pavlovia online resource, I should pay extra attention to files’ extension name with small or capital letter(e.g.: .png vs.PNG).

I think that my issue (of paths in downloaded resources) has been fixed in 2020.2.6

I’ll upgrade soon

1 Like

Sounds great!! Wish you good luck with your project :slight_smile: