# Unspecified JavaScript Error - BART

**URL:** <https://discourse.psychopy.org/t/unspecified-javascript-error-bart/23335>\
**Category:** Online experiments\
**Tags:** pavlovia\
**Created:** [June 3, 2021, 12:32pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-bart/23335 "2021-06-03T12:32:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cblac002](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@cblac002](https://discourse.psychopy.org/u/cblac002)\
**Post date:** [June 3, 2021, 12:32pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-bart/23335/1 "2021-06-03T12:32:45Z")

</div>

URL of experiment: [https://pavlovia.org/run/cblac002/mscbart/html/](https://pavlovia.org/run/cblac002/mscbart/html/)

Description of the problem: Using the BART master. I haven’t changed any of the code from the folders I downloaded but when I try to run the experiment on Pavlovia it returns this error. The participant ID page appears and then the error. Would love any help on what is going wrong.

---

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [June 7, 2021, 11:20am UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-bart/23335/2 "2021-06-07T11:20:08Z")

</div>

Hey! I’m not sure why, but there seems to be an issue with downloading the sound stimulus (bang.mp3). This might just resolve itself with the upcoming release, so first of a small question: what’s your plan with the BART?

---

<div class="post-metadata">

**Author:** ![cblac002](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@cblac002](https://discourse.psychopy.org/u/cblac002)\
**Post date:** [June 7, 2021, 11:36am UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-bart/23335/3 "2021-06-07T11:36:40Z")

</div>

Hi,  
I wonder whether if I remove the bang sound from the experiment it would work?  
I am hoping to use the BART as part of my MSc research project.

---

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [June 7, 2021, 12:08pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-bart/23335/4 "2021-06-07T12:08:53Z")

</div>

Give it a go I’d say 🙂

---

<div class="post-metadata">

**Author:** ![sotiri](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@sotiri](https://discourse.psychopy.org/u/sotiri)\
**Post date:** [June 9, 2021, 11:29am UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-bart/23335/5 "2021-06-09T11:29:49Z")

</div>

Hi @cblac002, thanks for flagging. There seems to be a problem with boilerplate generation here, because the BART demo comes from a previous version of PsychoPy and simply upgrading to version 2021.1.4 as in your project seems to have left certain parts in need of some tweaking.

In particular, the [`new Sound()` constructor call on line 190](https://gitlab.pavlovia.org/support/mscbart/blob/master/html/bart.js#L190) needs prefixing with _sound_ to match the PsychoJS import statements at the top of the script. I have created a [support fork](https://pavlovia.org/support/mscbart) to demonstrate the fix. Please let me know if you need more help, x

---

<div class="post-metadata">

**Author:** ![cblac002](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@cblac002](https://discourse.psychopy.org/u/cblac002)\
**Post date:** [June 10, 2021, 12:33pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-bart/23335/6 "2021-06-10T12:33:56Z")

</div>

Hi,  
thanks for the help!  
I am not getting access to anything by clicking on the link to the support fork you created. Maybe I am doing something wrong :S

---

<div class="post-metadata">

**Author:** ![sotiri](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@sotiri](https://discourse.psychopy.org/u/sotiri)\
**Post date:** [June 10, 2021, 12:41pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-bart/23335/7 "2021-06-10T12:41:18Z")

</div>

Sorry, forgot to give you access, is it okay now? [https://gitlab.pavlovia.org/support/mscbart](https://gitlab.pavlovia.org/support/mscbart)

---

<div class="post-metadata">

**Author:** ![cblac002](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@cblac002](https://discourse.psychopy.org/u/cblac002)\
**Post date:** [June 10, 2021, 1:00pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-bart/23335/8 "2021-06-10T13:00:09Z")

</div>

I actually went and had a look at the code and changed the lines you said, and also put the bang sound in .wav format into the folder and now it seems to be running!

Thank you so much for your help!

---

<div class="post-metadata">

**Author:** ![sotiri](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@sotiri](https://discourse.psychopy.org/u/sotiri)\
**Post date:** [June 10, 2021, 1:01pm UTC](https://discourse.psychopy.org/t/unspecified-javascript-error-bart/23335/9 "2021-06-10T13:01:28Z")

</div>

Ah cool, no worries, thanks for confirming, x
