# Help with: reference error: shuffle is not defined

**URL:** <https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446>\
**Category:** Online experiments\
**Tags:** randomization, online, pavlovia\
**Created:** [August 8, 2021, 6:06am UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446 "2021-08-08T06:06:34Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![Belinda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/belinda/32/30623_2.png) [@Belinda](https://discourse.psychopy.org/u/Belinda)\
**Post date:** [August 15, 2021, 12:39pm UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/21 "2021-08-15T12:39:23Z")

</div>

Is it best to upload the files via github?

---

<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:** [August 15, 2021, 5:33pm UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/22 "2021-08-15T17:33:08Z")

</div>

I always use the sync button in Builder.

---

<div class="post-metadata">

**Author:** ![Belinda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/belinda/32/30623_2.png) [@Belinda](https://discourse.psychopy.org/u/Belinda)\
**Post date:** [August 16, 2021, 3:04am UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/23 "2021-08-16T03:04:44Z")

</div>

So you just sync straight from builder and don’t have to worry about doing anything with gitlab or github?

![Screen Shot 2021-08-16 at 1.02.46 pm](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/3/6/363a253cbecb93b00d379cc96fa58a9dfb9e3f3d.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:** [August 16, 2021, 8:04am UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/24 "2021-08-16T08:04:10Z")

</div>

Yes

---

<div class="post-metadata">

**Author:** ![Belinda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/belinda/32/30623_2.png) [@Belinda](https://discourse.psychopy.org/u/Belinda)\
**Post date:** [August 16, 2021, 8:32am UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/25 "2021-08-16T08:32:50Z")

</div>

I moved all my other psychopy files that were in other folders to the trash just in case they were interfering, but whenever I try syncing I just get the wheel of death after I go through the steps of creating a project on pavlovia. Is it normal for it take some time to push the files to pavlovia?

 ![Screen Shot 2021-08-16 at 6.32.28 pm](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/b/3/b3d8eab888447997873f9fbc2fb09a8ddab39984.jpeg)

---

<div class="post-metadata">

**Author:** ![Belinda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/belinda/32/30623_2.png) [@Belinda](https://discourse.psychopy.org/u/Belinda)\
**Post date:** [August 16, 2021, 10:13am UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/26 "2021-08-16T10:13:44Z")

</div>

I moved the files to a USB and it seems to be actually online now: [Sustained attention to response task [PsychoPy]](https://run.pavlovia.org/belindam/sart)  
but I am getting this traceback error when I run it on my computer: ![Screen Shot 2021-08-16 at 8.09.48 pm](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/6/1/61408ef64a7acb820ec82932944708423882c800.png)  
I’m not sure if it has anything to do with my excel sheet:

 ![Screen Shot 2021-08-16 at 8.29.32 pm](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/e/6/e6976ea5a4a831fc42321a0793af05360c5f9c07.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:** [August 16, 2021, 10:31am UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/27 "2021-08-16T10:31:48Z")

</div>

Where does the list **times** come from?

Try `print('Preshuffle',times)` and you’ll probably discover it isn’t a list.

---

<div class="post-metadata">

**Author:** ![Belinda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/belinda/32/30623_2.png) [@Belinda](https://discourse.psychopy.org/u/Belinda)\
**Post date:** [August 16, 2021, 11:27am UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/29 "2021-08-16T11:27:00Z")

</div>

Hmm it’s still not working online, I’m getting this error: ![Screen Shot 2021-08-16 at 9.25.16 pm](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/7/9/79b53d7b0f6899dd6b7ae096e42ad44b1e39a108.png)

This is what my settings look like:

 ![Screen Shot 2021-08-16 at 9.26.26 pm](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/5/9/59af8fa2b0bc499614d4f4aec0c06aa01ada4581.png)  
 ![Screen Shot 2021-08-16 at 9.26.33 pm](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/2/0/208c12e685904a0b5fc2bf229edd81ee53030bee.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:** [August 16, 2021, 11:48am UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/30 "2021-08-16T11:48:21Z")

</div>

That’s an error which should be fixed either by using the latest version or by defining thisExp in code\_JS as per either of my crib sheets.

---

<div class="post-metadata">

**Author:** ![Belinda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/belinda/32/30623_2.png) [@Belinda](https://discourse.psychopy.org/u/Belinda)\
**Post date:** [August 16, 2021, 12:43pm UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/31 "2021-08-16T12:43:56Z")

</div>

Yes I think it’s finally working!! Thank you so much 🙂 I just have to edit my settings so that the font size for my instructions are stimuli are right

---

<div class="post-metadata">

**Author:** ![Belinda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/belinda/32/30623_2.png) [@Belinda](https://discourse.psychopy.org/u/Belinda)\
**Post date:** [August 16, 2021, 11:53pm UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/32 "2021-08-16T23:53:08Z")

</div>

Sorry to bother you again @wakecarter , but my experiment stops responding at around trial number 501 (out of 900), do you have any idea why it would be doing that?

---

<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:** [August 17, 2021, 12:38am UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/33 "2021-08-17T00:38:41Z")

</div>

There are 500 elements in your times list.

---

<div class="post-metadata">

**Author:** ![Belinda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/belinda/32/30623_2.png) [@Belinda](https://discourse.psychopy.org/u/Belinda)\
**Post date:** [August 17, 2021, 7:11am UTC](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446/34 "2021-08-17T07:11:30Z")

</div>

That makes sense! Thank you so much for all your help, it looks like it’s running normally now

[Previous page](https://discourse.psychopy.org/t/help-with-reference-error-shuffle-is-not-defined/24446.md?page=1)
