# Stuck on Initialising Experiment

**URL:** <https://discourse.psychopy.org/t/stuck-on-initialising-experiment/14080>\
**Category:** Online experiments\
**Created:** [June 8, 2020, 2:09pm UTC](https://discourse.psychopy.org/t/stuck-on-initialising-experiment/14080 "2020-06-08T14:09:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snoek](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Snoek](https://discourse.psychopy.org/u/Snoek)\
**Post date:** [June 8, 2020, 2:09pm UTC](https://discourse.psychopy.org/t/stuck-on-initialising-experiment/14080/1 "2020-06-08T14:09:45Z")

</div>

Dear all,

I have read through a lot of “stuck on initialising experiment” threads, but I still cannot seem to fix why I am stuck on this page. The experiment works perfectly without running online. I have looked through the crib-sheet for mistakes.

There are no longer any imports and I do not see any indication of what the problem could be.

I am very much hoping that somebody could shed insight into this as I am completely stuck. If any other information is needed, please let me know.

Best regards,

Snoek

---

<div class="post-metadata">

**Author:** ![Snoek](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Snoek](https://discourse.psychopy.org/u/Snoek)\
**Post date:** [June 8, 2020, 2:36pm UTC](https://discourse.psychopy.org/t/stuck-on-initialising-experiment/14080/3 "2020-06-08T14:36:29Z")

</div>

Thank you for your reply.

The file does exist, though the .py version is not in my html folder. I can drag it to my html folder.

---

<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 8, 2020, 2:51pm UTC](https://discourse.psychopy.org/t/stuck-on-initialising-experiment/14080/4 "2020-06-08T14:51:20Z")

</div>

Only the two js versions need to be there. I’m not sure of the issue but I was wondering if it was due to file renaming.

---

<div class="post-metadata">

**Author:** ![Snoek](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Snoek](https://discourse.psychopy.org/u/Snoek)\
**Post date:** [June 8, 2020, 2:55pm UTC](https://discourse.psychopy.org/t/stuck-on-initialising-experiment/14080/5 "2020-06-08T14:55:16Z")

</div>

I have made a new experiment to see if it has something to do with this, but the same problem occurs.

---

<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 8, 2020, 3:10pm UTC](https://discourse.psychopy.org/t/stuck-on-initialising-experiment/14080/6 "2020-06-08T15:10:45Z")

</div>

What code components do you have in Begin Experiment blocks? I find it easier to read Python code with notes for any manual translations.

---

<div class="post-metadata">

**Author:** ![dvbridges](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dvbridges/32/1918_2.png) [@dvbridges](https://discourse.psychopy.org/u/dvbridges)\
**Post date:** [June 8, 2020, 3:11pm UTC](https://discourse.psychopy.org/t/stuck-on-initialising-experiment/14080/7 "2020-06-08T15:11:38Z")

</div>

Its possibly due to the use of the percentage symbol in your file name.

---

<div class="post-metadata">

**Author:** ![Snoek](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Snoek](https://discourse.psychopy.org/u/Snoek)\
**Post date:** [June 8, 2020, 3:48pm UTC](https://discourse.psychopy.org/t/stuck-on-initialising-experiment/14080/8 "2020-06-08T15:48:21Z")

</div>

I seem to have gotten it to work now. It is, however, now stuck on the first screen. I am supposed to be able to go through the instructions with my arrow keys but I cannot move past the first screen.

As it seems related I found this earlier post: [https://github.com/psychopy/psychojs/pull/7](https://github.com/psychopy/psychojs/pull/7)

It recommends that JS type keys should be added: ‘right’, ‘left’, ‘ArrowLeft’, ‘ArrowRight’

I just saw that Internet Explorer may not work well in an earlier post, so I opened the experiment in Chrome and I am getting this error:  
**Unspecified JavaScript error**

---

<div class="post-metadata">

**Author:** ![Snoek](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Snoek](https://discourse.psychopy.org/u/Snoek)\
**Post date:** [June 8, 2020, 3:50pm UTC](https://discourse.psychopy.org/t/stuck-on-initialising-experiment/14080/9 "2020-06-08T15:50:09Z")

</div>

```auto
win.setColor([.2,.2,.2])

#total number of items
num_items = 29

#counters to hold the next stimulus reference
cur_image_n = 0
cur_image_1 = 0
cur_image_2 = 0
cur_instruction_1 = 0
cur_instruction_2 = 0

#############

#load in graph instructions
graph_image = ["Stimuli/graph.jpg", "Stimuli/graphb.jpg", "Stimuli/graphc.jpg", "Stimuli/graphd.jpg", "Stimuli/graphe.jpg", "Stimuli/graphf.jpg", "Stimuli/graphf.jpg", "Stimuli/graphg.jpg", "Stimuli/graphh.jpg"]
graph_instr = ["text"]

cur_graph = 0

################

#practice trial

practice_jars = ["Jars3/Jar_750.jpg", "Jars3/Jar_250.jpg", "Jars3/Jar_400.jpg"]
num_practice = 0

practice_jars2 = ["Jars3/Jar_175.jpg", "Jars3/Jar_800.jpg", "Jars3/Jar_725.jpg"]
num_practice2 = 0

practice_jars3 = ["Jars3/Jar_300.jpg", "Jars3/Jar_650.jpg", "Jars3/Jar_200.jpg"]
num_practice3 = 0

##############################################################

#loop the instruction trials

loopRepeats = [1,0,0,0,0,0,0,0,0,0,0,0,0,0]
lastResponse = None

#######################################

#amount of times invalid message

invalidcounter = 0
if invalidcounter > 2:
    core.quit()
    
    
##########
#pictures

print("all pictures")
picture = ["Jars3/Jar_150.jpg", "Jars3/Jar_175.jpg", "Jars3/Jar_200.jpg", "Jars3/Jar_225.jpg", "Jars3/Jar_250.jpg", "Jars3/Jar_275.jpg", "Jars3/Jar_300.jpg", "Jars3/Jar_325.jpg", "Jars3/Jar_350.jpg", "Jars3/Jar_375.jpg", "Jars3/Jar_400.jpg", "Jars3/Jar_425.jpg", "Jars3/Jar_450.jpg", "Jars3/Jar_475.jpg", "Jars3/Jar_500.jpg", "Jars3/Jar_525.jpg", "Jars3/Jar_550.jpg", "Jars3/Jar_575.jpg", "Jars3/Jar_600.jpg", "Jars3/Jar_650.jpg", "Jars3/Jar_675.jpg", "Jars3/Jar_700.jpg", "Jars3/Jar_725.jpg", "Jars3/Jar_750.jpg", "Jars3/Jar_775.jpg", "Jars3/Jar_800.jpg", "Jars3/Jar_825.jpg", "Jars3/Jar_850.jpg"]
print(picture)

picture1 = picture[:]
picture2 = picture[:]
picture3 = picture[:]

shuffle(picture1)
shuffle(picture2)
shuffle(picture3)

#print("picture1")
#print(picture1)
#print("picture2")
#print(picture2)
#print("picture3")
#print(picture3)

###############################

white=[1,1,1]
grey=[.2,.2,.2]
yellow=[1,1,0]
green=[-1,0,-1]
black=[-1,-1,-1]
red=[1,0,0]

```

I edited my code somewhat if that helps, and the JS part is not in this part of my code. I did add the shuffle, the win and thisExp codes to JS.
