psychopy.org | Reference | Downloads | Github

Cant Run my project online

URL of experiment:

Description of the problem:
The project is ok on my laptop local psychopy, but in online it has lots of errors, i couldnt fix after many searches. i would be very appreciated if anyone can help me. thanks

Hello,

do you mind posting the first error thyt you encounter online?

Best wishes Jens

Sure, thank you,
the first error is:
RefrenceError: “training_image_mask” isnot defined.

Hello,

there are a couple of reasons for this error. There is a

  1. spelling error (filename and reference differ)
  2. extension forgotten (PsychoPy “looks” for the best fitting file, PsychoJS does not).
  3. not marked as a online resource when loaded via script (is training_image_mask available as a resource on gitlab?) I couldn’t find it.

Best wishes Jens

1 Like

I checked your first and second reasons and they weren’t the problem. but I cant understand your third one. it is the name of a variable and i have pushed all my images on gitlab. thankyou so much

Hello,

when, where and how do you define training_image_mask?

Best wishes Jens

Hey,
in a routine which is the beginning of a loop, inside a “code” component, which is the first element of that routine, the code type is “Auto → JS”, and python codes has written in “Begin Routine” section like this:

training_image_mask = masked_images_dir + selected_class + '/' + str(middle_range) + '/' + str(trial_number) + '.jpg'

Try printing the values of all of those elements to check which one(s) are causing the issue and then look at where and how they are defined.

It’s ok on my local laptop, the error is when I run it on pavlovia, how can I see the prints on online experiment ?

The browser console. Please look at my crib sheet for details.