# 403 forbidden error nginx

**URL:** <https://discourse.psychopy.org/t/403-forbidden-error-nginx/23768>\
**Category:** Online experiments\
**Created:** [June 28, 2021, 7:35am UTC](https://discourse.psychopy.org/t/403-forbidden-error-nginx/23768 "2021-06-28T07:35:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Catherine](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Catherine](https://discourse.psychopy.org/u/Catherine)\
**Post date:** [June 28, 2021, 7:35am UTC](https://discourse.psychopy.org/t/403-forbidden-error-nginx/23768/1 "2021-06-28T07:35:11Z")

</div>

URL of experiment:

Description of the problem:  
Hello,

I am getting a 403 Forbidden error message when I try to pilot my experiment on Pavlovia. I went through several posts and made sure I have HTML, js in my github repository. Additionally, the experiment was using builder to insert custom code. All my image stimuli are JPEG. I have tried inactivate and pilot again.

At this point, I am running out of solutions. Could anyone help me with this issue?

A million thanks!

---

<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 28, 2021, 8:09am UTC](https://discourse.psychopy.org/t/403-forbidden-error-nginx/23768/2 "2021-06-28T08:09:08Z")

</div>

Is your experiment set to Piloting/Running?

What is the URL?

---

<div class="post-metadata">

**Author:** ![Catherine](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Catherine](https://discourse.psychopy.org/u/Catherine)\
**Post date:** [June 28, 2021, 5:11pm UTC](https://discourse.psychopy.org/t/403-forbidden-error-nginx/23768/3 "2021-06-28T17:11:36Z")

</div>

Hello Wakecarter,

Thank you very much for the prompt reply. My experiment is set to piloting, since I don’t have credit yet.

This is the piloting URL: [https://run.pavlovia.org/jingyi\_wang/import\_display/html/?\_\_pilotToken=70efdf2ec9b086079795c442636b55fb&\_\_oauthToken=317f0811e07ba16cf11345e2288dc08109f8fab958ca011ddfa34e35dea6703f](https://run.pavlovia.org/jingyi_wang/import_display/html/? __pilotToken=70efdf2ec9b086079795c442636b55fb&__ oauthToken=317f0811e07ba16cf11345e2288dc08109f8fab958ca011ddfa34e35dea6703f).

Do I need to have credit to pilot my experiment? I used to pilot without credit.

I can also share with your my gitlab repository, if needed. Thank you so much for the tremendous 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:** [June 28, 2021, 5:29pm UTC](https://discourse.psychopy.org/t/403-forbidden-error-nginx/23768/4 "2021-06-28T17:29:48Z")

</div>

The reason for your forbidden error is that you have html in the path when you shouldn’t have. Your link should be

[https://run.pavlovia.org/jingyi\_wang/import\_display/?\_\_pilotToken=70efdf2ec9b086079795c442636b55fb&\_\_oauthToken=317f0811e07ba16cf11345e2288dc08109f8fab958ca011ddfa34e35dea6703f](https://run.pavlovia.org/jingyi_wang/import_display/? __pilotToken=70efdf2ec9b086079795c442636b55fb&__ oauthToken=317f0811e07ba16cf11345e2288dc08109f8fab958ca011ddfa34e35dea6703f)

However, it fails because it can’t load you libraries

```auto
Failed to load resource: the server responded with a status of 404 ()
/jingyi_wang/import_display/lib/data-2020.2.js:1 Failed to load resource: the server responded with a status of 404 ()
/jingyi_wang/import_display/lib/util-2020.2.js:1 Failed to load resource: the server responded with a status of 404 ()
/jingyi_wang/import_display/lib/visual-2020.2.js:1 Failed to load resource: the server responded with a status of 404 ()
/jingyi_wang/import_display/lib/sound-2020.2.js:1 Failed to load 

```

---

<div class="post-metadata">

**Author:** ![Catherine](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Catherine](https://discourse.psychopy.org/u/Catherine)\
**Post date:** [June 28, 2021, 5:49pm UTC](https://discourse.psychopy.org/t/403-forbidden-error-nginx/23768/5 "2021-06-28T17:49:30Z")

</div>

Thank you so much for pointing that out! I am sorry I have no idea why I have html in the path. Do you mind give me a hint about what happened?

All I did was sync using psychopy builder.  
This is my experiment settings:

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

This is all the files I uploaded into the gitlub:

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

I have also tried remove the html folder. Pavlovia still gives me an 403 error. Actually one of my custom code (manually import condition files) needs me to put condition file in the html/resources folder. That is the reason I created it. I have another demo that do not have that custom code, which yield with the same 403 error.

A million thanks!

---

<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 28, 2021, 7:07pm UTC](https://discourse.psychopy.org/t/403-forbidden-error-nginx/23768/6 "2021-06-28T19:07:51Z")

</div>

Editing folders on Gitlab directly is likely to cause issues.

You shouldn’t be manually importing from html/resources since this is dynamically created (and is no longer the default because it causes unnecessary file duplication).

---

<div class="post-metadata">

**Author:** ![Catherine](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Catherine](https://discourse.psychopy.org/u/Catherine)\
**Post date:** [June 28, 2021, 10:35pm UTC](https://discourse.psychopy.org/t/403-forbidden-error-nginx/23768/7 "2021-06-28T22:35:24Z")

</div>

Hello Wakecarter,

Thank you so much for your prompt reply. With your helpful suggestion, I delete the html folder locally and tried to create a new project in my pavlovia account. This yield with this error:

```auto
 File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\pavlovia_ui\project.py", line 161, in submitChanges
   self.parent.project = self.project
AttributeError: 'NoneType' object has no attribute 'project'

```

This remind me that everytime I tried to created a new project with this demo (not sync), it will give me this error. But after I click ok, psychopy still creates the project. Do you think this may yield with the 403 error I am getting now?

Thank you so much.

---

<div class="post-metadata">

**Author:** ![Catherine](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@Catherine](https://discourse.psychopy.org/u/Catherine)\
**Post date:** [June 29, 2021, 12:16am UTC](https://discourse.psychopy.org/t/403-forbidden-error-nginx/23768/8 "2021-06-29T00:16:04Z")

</div>

> [@Catherine](#):
>
> `AttributeError: 'NoneType' object has no attribute 'project'`

Hello Wakecarter,

Just want to update with you. You are totally right about the extra html folder. Somehow with the error that I mentioned in the above thread, my experiment worked online. One additional note I found is that this is an error with some other people. See [link](https://discourse.psychopy.org/t/im-not-able-to-upload-the-experiment-to-pavlovia-so-that-i-can-run-it-online-i-get-an-error-message-saying-that-there-is-an-internal-error/16080/8). If possible, do you mind help me identify the cause of this error?

Thank you so much!
