# Stuck at initialising the experiment

**URL:** <https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170>\
**Category:** Online experiments\
**Tags:** pavlovia\
**Created:** [May 23, 2021, 7:58pm UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170 "2021-05-23T19:58:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![carolinaguerra](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@carolinaguerra](https://discourse.psychopy.org/u/carolinaguerra)\
**Post date:** [May 23, 2021, 7:58pm UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/1 "2021-05-23T19:58:08Z")

</div>

URL of experiment: [https://pavlovia.org/run/carolina.guerra/figurella-project/html/](https://pavlovia.org/run/carolina.guerra/figurella-project/html/)

Description of the problem:I built my experiment on PsychoPy and uploaded it to Pavlovia, but when I click on the URL and try to run it, it gets stuck on initializing the experiment. I have opened the console tab and the message it shows is this:

 ![Schermata 2021-05-23 alle 21.49.14](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/d/1/d141705fd6b14b5042521fa4c2ad392574b910c8.png)

I went to line 209 where there was a comma on an empty line so I brought it to the previous line (font: ‘Arial’) after which the comma was missing.  
Despite this the problem persists and the consol reports the same error…

I’ve also noticed that there is this message when I place the cursor on the exclamation mark:  
 ![Schermata 2021-05-23 alle 21.33.44](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/d/b/dbe66e845d23e6ca4e7982d5f3de144df529ac8b.png)

My knowledge about coding is zero, so please help me out!!  
Many thanks,

Carolina

---

<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:** [May 23, 2021, 8:18pm UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/2 "2021-05-23T20:18:49Z")

</div>

There’s a bug in PsychoPy which gives an error if you have a text element that starts empty. Add a space to instrText.

---

<div class="post-metadata">

**Author:** ![carolinaguerra](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@carolinaguerra](https://discourse.psychopy.org/u/carolinaguerra)\
**Post date:** [May 24, 2021, 4:48pm UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/3 "2021-05-24T16:48:23Z")

</div>

thank you very much!! Actually now I have another problem which I’ve seen you discussed on another topic… [ReferenceError: frameDur is not defined.](https://discourse.psychopy.org/t/referenceerror-framedur-is-not-defined-problem-converting-from-pyschopy-to-js/13270)  
But still I don’t understand what I should do, because as I was saying I am very new to all this!

 ![Schermata 2021-05-24 alle 17.03.04](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/6/8/680a823029e82e718aab3d1358a22fbda10b4c24.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:** [May 24, 2021, 5:12pm UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/4 "2021-05-24T17:12:45Z")

</div>

According to my [crib sheet](https://docs.google.com/document/d/183xmwDgSbnJZHMGf3yWpieV9Bx8y7fOCm3QKkMOOXFQ/edit?usp=sharing)

[ReferenceError: frameDur is not defined](https://discourse.psychopy.org/search?q=ReferenceError%3A%20frameDur%20is%20not%20defined%20status%3Asolved) frameDur is a PsychoJS variable used for calculating frame durations. This error tends to occur when the JS has not compiled correctly, and so PsychoPy fails to declare the builtin variables in the JS code. The actual error is usually visible from the Psychopy dialog.

> [@ReferenceError: frameDur is not defined. Problem converting from pyschopy to JS?](https://discourse.psychopy.org/t/referenceerror-framedur-is-not-defined-problem-converting-from-pyschopy-to-js/13270):
>
> URL of experiment: [https://run.pavlovia.org/cathgrainger/context-2](https://run.pavlovia.org/cathgrainger/context-2) Description of the problem: Problem running task, ReferenceError: frameDur is not defined. The problem I am having is with a task that I have built in PsychoPy builder (which runs smoothly) and now I want to put online. I have converted it to JavaScript and uploaded to PsychoPy but am now getting the error message: ReferenceError: frameDur is not defined. When I try and debug this it is telling me that frameDur is not define…

---

<div class="post-metadata">

**Author:** ![carolinaguerra](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@carolinaguerra](https://discourse.psychopy.org/u/carolinaguerra)\
**Post date:** [May 24, 2021, 5:31pm UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/5 "2021-05-24T17:31:54Z")

</div>

> [@wakecarter](#):
>
> Psychopy dialog

But the Psychopy dialog doesn’t show any error ☹

---

<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:** [May 24, 2021, 5:32pm UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/6 "2021-05-24T17:32:47Z")

</div>

What is line 96 of the JS file?

---

<div class="post-metadata">

**Author:** ![carolinaguerra](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@carolinaguerra](https://discourse.psychopy.org/u/carolinaguerra)\
**Post date:** [May 24, 2021, 5:38pm UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/7 "2021-05-24T17:38:49Z")

</div>

![Schermata 2021-05-24 alle 19.37.13](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/5/c/5c82c0ff32183e3944e90285128c74670507d071.png)

Sorry maybe it’s easy but I simply don’t understand how to proceed…thank you for your help!!

---

<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:** [May 24, 2021, 5:56pm UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/8 "2021-05-24T17:56:48Z")

</div>

That line shouldn’t have an error which is why you probably need to look at PsychoPy itself when syncing.

You could also try setting the experiment to inactive and then active/piloting again.

---

<div class="post-metadata">

**Author:** ![carolinaguerra](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@carolinaguerra](https://discourse.psychopy.org/u/carolinaguerra)\
**Post date:** [May 24, 2021, 7:21pm UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/9 "2021-05-24T19:21:30Z")

</div>

Should I look at the script of the task in Psychopy?  
Or maybe at the code component in the builder?  
When I run the task from Psychopy it reports no errors…

---

<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:** [May 24, 2021, 10:30pm UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/10 "2021-05-24T22:30:06Z")

</div>

What happens when you press the sync icon in Builder? Does it turn green? Do any messages appear in the runner or in a pop up?

---

<div class="post-metadata">

**Author:** ![carolinaguerra](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@carolinaguerra](https://discourse.psychopy.org/u/carolinaguerra)\
**Post date:** [May 25, 2021, 5:48am UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/11 "2021-05-25T05:48:35Z")

</div>

When I press that icon it just appear a window where I have to describe the changes I’ve made…I left it blank and pressed ‘ok’. Nothing appeared nowhere; then I tried to run the experiment and it worked. This is the runner when I was about to start

 ![Schermata 2021-05-25 alle 07.44.22](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/d/b/dbd5c88f29dbdab54b9f2d6045454b2dba567e13.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:** [May 25, 2021, 6:02am UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/12 "2021-05-25T06:02:28Z")

</div>

I notice that you have two sets of JS files in your repository. Pavlovia can only cope with one experiment in each folder. I would recommend that you copy your psyexp file and resources to a new empty local folder and create a new project.

---

<div class="post-metadata">

**Author:** ![carolinaguerra](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@carolinaguerra](https://discourse.psychopy.org/u/carolinaguerra)\
**Post date:** [May 26, 2021, 8:34am UTC](https://discourse.psychopy.org/t/stuck-at-initialising-the-experiment/23170/13 "2021-05-26T08:34:35Z")

</div>

I0ve done what you suggested and then pressed ‘sync’  
This window opened up:

 ![Schermata 2021-05-26 alle 10.30.29](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/7/f/7f764deef072460b838b9ba9d64b4a582a7a8475.png)
