# Updating outdated Experiment

**URL:** https://discourse.psychopy.org/t/updating-outdated-experiment/45007
**Category:** Online experiments
**Created:** [June 10, 2025, 7:16am UTC](https://discourse.psychopy.org/t/updating-outdated-experiment/45007 "2025-06-10T07:16:54Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Dareloth](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@Dareloth](https://discourse.psychopy.org/u/Dareloth)
#### Post date: [June 10, 2025, 7:16am UTC](https://discourse.psychopy.org/t/updating-outdated-experiment/45007/1 "2025-06-10T07:16:54Z")

</div>

I am well aware that it is a large ask, but I have been trying to fix an old experiment of my uni for the last couple of weeks. I tried really! hard to not push my problems onto other people, but I am at a loss. If someone could take a look at the files and maybe spot an easy fix for which I am not savy enough, that would be enormous. Thank you guys in advance.

**OS** Win10  
**PsychoPy version** 2024.2.4  
**Standard Standalone Installation**  
**[Sign in · GitLab](https://gitlab.pavlovia.org/Benedikt.Tannhof/mstcc193)**  
**Do you want it to also run locally? n**  
**What are you trying to achieve?:**  
I have inherited the experiment from my university and it was already executed succesfully in the past (not by me and a couple years ago). I would like it to run again.

In my opinion the problem lies in the conversion of the .py script to .js. The experiment encounters multiple issues, starting with the download of the resources not working.

**What did you try to make it work?:**  
I have troubleshot multiple code-components and tried to rewrite them via AI. Sadly I am not good with the task at hand and the person in charge of the code is no longer available.

---

<div class="post-metadata">

### Author: ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)
#### Post date: [June 10, 2025, 8:34am UTC](https://discourse.psychopy.org/t/updating-outdated-experiment/45007/2 "2025-06-10T08:34:59Z")

</div>

If you want a PsychoPy experiment to run online, you need the psyexp file.

> [@Wakefield's Daily Tips](https://discourse.psychopy.org/t/wakefields-daily-tips/43371/19):
>
> Builder isn’t Coder I strongly discourage the use of PsychoPy Coder for the creation of psychology experiments because Builder is easier to debug, share with others and translate into PsychoJS for use online. If you already have an experiment written in Coder, pasting the code into Builder code components is not sufficient to turn it into a Builder experiment. The logic of how to arrange an experiment is slightly different because of the way Builder works with components, routines and loops. F…

---

<div class="post-metadata">

### Author: ![Dareloth](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@Dareloth](https://discourse.psychopy.org/u/Dareloth)
#### Post date: [June 10, 2025, 9:08am UTC](https://discourse.psychopy.org/t/updating-outdated-experiment/45007/3 "2025-06-10T09:08:32Z")

</div>

As far I can tell, “everything” should be already there. I have attached the repository in my original post.

---

<div class="post-metadata">

### Author: ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)
#### Post date: [June 10, 2025, 10:49am UTC](https://discourse.psychopy.org/t/updating-outdated-experiment/45007/4 "2025-06-10T10:49:13Z")

</div>

Your current error is with backslashes.

> [@Wakefield's Daily Tips](https://discourse.psychopy.org/t/wakefields-daily-tips/43371/31):
>
> Use foreslashes not backslashes in file paths Windows file paths use backslashes (\) to separate the folders in the path. This doesn’t work online because Linux-base servers use slashes (/) instead. Worse than that, the backslash character is used to mark the beginning of an “escape sequence” so the following character is interpreted by JavaScript as something else. Here are some examples: \n new line \t tab \' or \" Literal single or double quotes \\ Literal \ \b backpace \xHH characte…

found with

> [@Wakefield's Daily Tips](https://discourse.psychopy.org/t/wakefields-daily-tips/43371/5):
>
> Developer Tools If you encounter an error in an online study, open the Developer tools console using Ctl-Shift-I in Windows/Chrome, Cmd-Opt-J or Cmd-Opt-I in Mac/Chrome, F12 in IE/Edge, Ctrl-Shift-J in Windows/Safari or Ctrl-Opt-J in Mac/Safari. Select the Console tab at the top and errors item on the left to view errors. Ignore the 404 error related to favicon.ico Look for the error that appears on the main screen and click on the link next to Scheduler.\_currentTask. Take…

---

<div class="post-metadata">

### Author: ![Dareloth](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@Dareloth](https://discourse.psychopy.org/u/Dareloth)
#### Post date: [June 10, 2025, 2:18pm UTC](https://discourse.psychopy.org/t/updating-outdated-experiment/45007/5 "2025-06-10T14:18:25Z")

</div>

Cheers wakecarter (and everyone reading along, maybe :D),

thank you so much again. I have by now fixed the afforementioned error with the backslashes, which caused me another problem: I ran into trouble with the previous method of downloading resources. By now the experiment downloads them all as I added a Resource Manager component instead. Now I encounter another problem:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/b/7/b7a1b9e5501f1515ca5f5e598ad76cefb724ee61.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/1/6/16006c3d98da2e4351458bd6df3c8492cfd61a97.png)

I apologize again for the inconvenience and greatly appreciate the support so far. I have updated the repository as well if that proviedes necessary information.

Edit: I am also aware of this suggestion, sadly I have failed so far to implement it - if it is the problem at hand at all:

> [@TypeError: Cannot read properties of undefined (reading 'src')](https://discourse.psychopy.org/t/typeerror-cannot-read-properties-of-undefined-reading-src/27550):
>
> URL of an experiment: [IOR [PsychoPy]](https://run.pavlovia.org/Carmel/ponzo_illusion_inhibitation_of_return) Description of the problem: The error occurs when running through trials of the experiment. After a certain amount of variable responses, the TypeError: Cannot read properties of undefined (reading ‘src’) error occurs. In some conditions, the error only appears after 2-3 trials while other conditions take up to 30 trials for the error to occur. Any help would be great. I have limited coding experience so this is daunting

---

<div class="post-metadata">

### Author: ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)
#### Post date: [June 10, 2025, 2:38pm UTC](https://discourse.psychopy.org/t/updating-outdated-experiment/45007/6 "2025-06-10T14:38:27Z")

</div>

> [@Dareloth](#):
>
> Edit: I am also aware of this suggestion, sadly I have failed so far to implement it - if it is the problem at hand at all:

The thread you link suggests that you might have a blank row or cell in your spreadsheet. Have you checked?

> [@Wakefield's Daily Tips](https://discourse.psychopy.org/t/wakefields-daily-tips/43371/28):
>
> Check for blank rows in your spreadsheets It is all too easy to end up with blank rows or columns in a spreadsheet. If you highlight cells and then press delete, you are removing the contents from the cells, not deleting them altogether. If you experience blank trials or errors at random points in a loop then blank rows are a likely culprit. If you set the loop type to sequential, then the error will probably happen after your expected trials. You can tell how many rows your spreadsheet has by …

> [@Wakefield's Daily Tips](https://discourse.psychopy.org/t/wakefields-daily-tips/43371/100):
>
> TypeError: Cannot read properties of undefined (reading ‘x’) While similar to [TypeError: Cannot read property ‘x’ of undefined](https://discourse.psychopy.org/t/wakefields-daily-tips/43371/92), the format of this error implies a different cause. Sometimes there is information about the location of the error and sometime there is just the error message. If the error occurs at a random point during a loop then it may be due to a blank cell. Check that the number…

---

<div class="post-metadata">

### Author: ![Dareloth](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@Dareloth](https://discourse.psychopy.org/u/Dareloth)
#### Post date: [June 10, 2025, 3:06pm UTC](https://discourse.psychopy.org/t/updating-outdated-experiment/45007/7 "2025-06-10T15:06:13Z")

</div>

Currently the experiment (as it was handed to me) does not use a .csv for the stimuli. Rather every single stimulus is deposited seperately in the properties and as of now in my freshly created resource manager

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/c/1/c16e6bf4924b24e98a0d49a2e70dfe6a468de4c9.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/e/7/e75d0fb83909cd329e3fdc64fbfef3d3d5060dde.png)

Should I insted try to create a CSV containing a column for each set and the filename of each jpg (001a.jpg all through to 192b.jpg ? I am currently trying to stick to the original experiment as closely as possible in the hope of preventing followup-errors. According to my supervisor it “used to work”.

Thanks again.

---

<div class="post-metadata">

### Author: ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)
#### Post date: [June 10, 2025, 3:22pm UTC](https://discourse.psychopy.org/t/updating-outdated-experiment/45007/8 "2025-06-10T15:22:45Z")

</div>

The resource manager is distinct from how the image names are assigned to the image component. Do you have a separate image component for every image file, or a list hard coded into a code component?

Personally, I rarely use the resource manager component. I add resources in Experiment Settings / Online or use a code component.

---

<div class="post-metadata">

### Author: ![Dareloth](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@Dareloth](https://discourse.psychopy.org/u/Dareloth)
#### Post date: [June 10, 2025, 3:46pm UTC](https://discourse.psychopy.org/t/updating-outdated-experiment/45007/9 "2025-06-10T15:46:43Z")

</div>

The image component looks like this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/7/5/75ad185dfad6af78bc7fab01d389cef6770cdc85.png)

The experiment also uses a code component to set the trial count:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/1/4/14868ce2064d38c19c26b3ae8afa8e96fe120988.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/6/0/60fd9839f7e77ea04024e7e4bb3fefb071d3d1de.png)

---

<div class="post-metadata">

### Author: ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)
#### Post date: [June 10, 2025, 4:46pm UTC](https://discourse.psychopy.org/t/updating-outdated-experiment/45007/10 "2025-06-10T16:46:33Z")

</div>

Where is enclist defined?
