# Failed to upsert bucket: returned error 403 Forbidden:

**URL:** <https://community.wandb.ai/t/failed-to-upsert-bucket-returned-error-403-forbidden/8150>\
**Category:** W&B Help\
**Tags:** wandb, beginner-friendly\
**Created:** [October 14, 2024, 9:52am UTC](https://community.wandb.ai/t/failed-to-upsert-bucket-returned-error-403-forbidden/8150 "2024-10-14T09:52:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bassfaye10](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@bassfaye10](https://community.wandb.ai/u/bassfaye10)\
**Post date:** [October 14, 2024, 9:52am UTC](https://community.wandb.ai/t/failed-to-upsert-bucket-returned-error-403-forbidden/8150/1 "2024-10-14T09:52:44Z")

</div>

Hello,  
I am a new using wanb. I want to experiment tracking by using wandb and executing python commands. However I get this error.

wandb: Currently logged in as: bassfaye10. Use `wandb login --relogin` to force relogin  
wandb: ERROR failed to upsert bucket: returned error 403 Forbidden: {“errors”:[{“message”:“permission denied”,“path”:[“upsertBucket”],“extensions”:{“code”:“PERMISSION\_ERROR”}}],“data”:{“upsertBucket”:null}}  
How to solve this error?  
Thanks in advance,

---

<div class="post-metadata">

**Author:** ![joana-marie](https://avatars.discourse-cdn.com/v4/letter/j/f6c823/32.png) [@joana-marie](https://community.wandb.ai/u/joana-marie)\
**Post date:** [October 16, 2024, 8:53am UTC](https://community.wandb.ai/t/failed-to-upsert-bucket-returned-error-403-forbidden/8150/2 "2024-10-16T08:53:35Z")

</div>

Hi @bassfaye10 ,happy to help. Could you please share the following to better assess the issue:

-Kindly expound your specific use case/experiment  
-Code Snippet  
-Environment Set up  
-the `debug.log` and `debug-internal.log`. These files are under your local folder `wandb/run-<date>_<time>-<run-id>/logs` in the same directory where you’re running your code.

---

<div class="post-metadata">

**Author:** ![bassfaye10](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@bassfaye10](https://community.wandb.ai/u/bassfaye10)\
**Post date:** [October 16, 2024, 9:13am UTC](https://community.wandb.ai/t/failed-to-upsert-bucket-returned-error-403-forbidden/8150/3 "2024-10-16T09:13:02Z")

</div>

Hi [@JoanaMarieL](https://github.com/JoanaMarieL),  
I want to use machine learning for tooth segmentation. So I’ve found an example on github on this link: [GitHub - limhoyeon/ToothGroupNetwork: 3D Dental surface segmentation with Tooth Group Network](https://github.com/limhoyeon/ToothGroupNetwork). I want to initiate myself on machine learning by compiling this project.  
Here are informations that you need:

1. **Code Snippet:**

### train.py

_if config[“wandb”][“wandb\_on”]:  
wandb.init(  
entity=self.config[“wandb”][“wandb\_entity”],  
project=self.config[“wandb”][“project”],  
notes=self.config[“wandb”][“notes”],  
tags=self.config[“wandb”][“tags”],  
name=self.config[“wandb”][“name”],  
config=self.config,  
)_

1. **Full stack trace error:**

\_wandb: ERROR failed to upsert bucket: returned error 403 Forbidden: {“errors”:[{“message”:“permission denied”,“path”:[“upsertBucket”],“extensions”:{“code”:“PERMISSION\_ERROR”}}],“data”:{“upsertBucket”:null}}  
Traceback (most recent call last):  
File “start\_train.py”, line 51, in  
runner(config, model)  
File “F:\ToothGroupNetwork\runner.py”, line 56, in runner  
trainner = Trainer(config=config, model = model, gen\_set=gen\_set)  
File “F:\ToothGroupNetwork\trainer.py”, line 15, in **init**  
wandb.init(  
File “C:\Users\serigne\_admin\AppData\Local\Programs\Python\Python38\lib\site-packages\wandb\sdk\wandb\_init.py”, line 1266, in init  
wandb._sentry.reraise(e)  
File “C:\Users\serigne\_admin\AppData\Local\Programs\Python\Python38\lib\site-packages\wandb\analytics\sentry.py”, line 155, in reraise  
raise exc.with\_traceback(sys.exc\_info()[2])  
File “C:\Users\serigne\_admin\AppData\Local\Programs\Python\Python38\lib\site-packages\wandb\sdk\wandb\_init.py”, line 1252, in init  
return wi.init()  
File “C:\Users\serigne\_admin\AppData\Local\Programs\Python\Python38\lib\site-packages\wandb\sdk\wandb\_init.py”, line 844, in init  
raise error  
wandb.errors.errors.CommError: failed to upsert bucket: returned error 403 Forbidden: {“errors”:[{“message”:“permission denied”,“path”:[“upsertBucket”],“extensions”:{“code”:“PERMISSION\_ERROR”}}],“data”:{“upsertBucket”:null}}_

1. **Debug.log**  
\_### 2024-10-14 11:16:39,633 INFO MainThread:15652 [wandb\_setup.py:\_flush():79] Current SDK version is 0.18.3  
2024-10-14 11:16:39,633 INFO MainThread:15652 [wandb\_setup.py:\_flush():79] Configure stats pid to 15652  
2024-10-14 11:16:39,633 INFO MainThread:15652 [wandb\_setup.py:\_flush():79] Loading settings from C:\Users\serigne\_admin.config\wandb\settings  
2024-10-14 11:16:39,633 INFO MainThread:15652 [wandb\_setup.py:\_flush():79] Loading settings from F:\ToothGroupNetwork\wandb\settings  
2024-10-14 11:16:39,633 INFO MainThread:15652 [wandb\_setup.py:\_flush():79] Loading settings from environment variables: {}  
2024-10-14 11:16:39,633 INFO MainThread:15652 [wandb\_setup.py:\_flush():79] Applying setup settings: {‘mode’: None, ‘\_disable\_service’: None}  
2024-10-14 11:16:39,652 INFO MainThread:15652 [wandb\_setup.py:\_flush():79] Inferring run settings from compute environment: {‘program\_relpath’: ‘start\_train.py’, ‘program\_abspath’: ‘F:\ToothGroupNetwork\start\_train.py’, ‘program’: ‘start\_train.py’}  
2024-10-14 11:16:39,652 INFO MainThread:15652 [wandb\_setup.py:\_flush():79] Applying login settings: {}  
2024-10-14 11:16:39,652 INFO MainThread:15652 [wandb\_init.py:\_log\_setup():532] Logging user logs to F:\ToothGroupNetwork\wandb\run-20241014\_111639-i5vb5pi5\logs\debug.log  
2024-10-14 11:16:39,652 INFO MainThread:15652 [wandb\_init.py:\_log\_setup():533] Logging internal logs to F:\ToothGroupNetwork\wandb\run-20241014\_111639-i5vb5pi5\logs\debug-internal.log  
2024-10-14 11:16:39,652 INFO MainThread:15652 [wandb\_init.py:init():617] calling init triggers  
2024-10-14 11:16:39,652 INFO MainThread:15652 [wandb\_init.py:init():624] wandb.init called with sweep\_config: {}  
config: {‘wandb’: {‘entity’: ‘bassfaye10’, ‘wandb\_on’: True, ‘project’: ‘3d tooth mesh segmentation’, ‘tags’: ‘3d tooth mesh segmentation’, ‘notes’: ‘3d tooth mesh segmentation’, ‘name’: ‘tgnet\_0620’}, ‘generator’: {‘input\_data\_dir\_path’: ‘data\_preprocessed\_directory’, ‘train\_data\_split\_txt\_path’: ‘base\_name\_train\_fold.txt’, ‘val\_data\_split\_txt\_path’: ‘base\_name\_val\_fold.txt’, ‘aug\_obj\_str’: “aug.Augmentator([aug.Scaling([0.85, 1.15]), aug.Rotation([-30,30], ‘fixed’), aug.Translation([-0.2, 0.2])])”, ‘train\_batch\_size’: 1, ‘val\_batch\_size’: 1}, ‘checkpoint\_path’: ‘ckpts/tgnet\_0620’, ‘tr\_set’: {‘optimizer’: {‘lr’: 0.1, ‘NAME’: ‘sgd’, ‘momentum’: 0.9, ‘weight\_decay’: 0.0001}, ‘scheduler’: {‘sched’: ‘cosine’, ‘warmup\_epochs’: 0, ‘full\_steps’: 40, ‘schedueler\_step’: 15000000, ‘min\_lr’: 1e-05}, ‘loss’: {‘cbl\_loss\_1’: 1, ‘cbl\_loss\_2’: 1, ‘tooth\_class\_loss\_1’: 1, ‘tooth\_class\_loss\_2’: 1, ‘offset\_1\_loss’: 0.03, ‘offset\_1\_dir\_loss’: 0.03, ‘chamf\_1\_loss’: 0.15}}, ‘model\_parameter’: {‘input\_feat’: 6, ‘stride’: [1, 4, 4, 4, 4], ‘nsample’: [36, 24, 24, 24, 24], ‘blocks’: [2, 3, 4, 6, 3], ‘block\_num’: 5, ‘planes’: [32, 64, 128, 256, 512], ‘crop\_sample\_size’: 3072}}  
2024-10-14 11:16:39,652 INFO MainThread:15652 [wandb\_init.py:init():667] starting backend  
2024-10-14 11:16:39,652 INFO MainThread:15652 [wandb\_init.py:init():671] sending inform\_init request  
2024-10-14 11:16:39,652 INFO MainThread:15652 [backend.py:_multiprocessing\_setup():104] multiprocessing start\_methods=spawn, using: spawn  
2024-10-14 11:16:39,656 INFO MainThread:15652 [wandb\_init.py:init():684] backend started and connected  
2024-10-14 11:16:39,663 INFO MainThread:15652 [wandb\_init.py:init():779] updated telemetry  
2024-10-14 11:16:39,663 INFO MainThread:15652 [wandb\_init.py:init():812] communicating run to backend with 90.0 second timeout  
2024-10-14 11:16:40,077 ERROR MainThread:15652 [wandb\_init.py:init():838] encountered error: failed to upsert bucket: returned error 403 Forbidden: {“errors”:[{“message”:“permission denied”,“path”:[“upsertBucket”],“extensions”:{“code”:“PERMISSION\_ERROR”}}],“data”:{“upsertBucket”:null}}  
2024-10-14 11:16:40,077 ERROR MainThread:15652 [wandb\_init.py:init():1262] error in wandb.init()  
Traceback (most recent call last):  
File “C:\Users\serigne\_admin\AppData\Local\Programs\Python\Python38\lib\site-packages\wandb\sdk\wandb\_init.py”, line 1252, in init  
return wi.init()  
File “C:\Users\serigne\_admin\AppData\Local\Programs\Python\Python38\lib\site-packages\wandb\sdk\wandb\_init.py”, line 844, in init  
raise error  
wandb.errors.errors.CommError: failed to upsert bucket: returned error 403 Forbidden: {“errors”:[{“message”:“permission denied”,“path”:[“upsertBucket”],“extensions”:{“code”:“PERMISSION\_ERROR”}}],“data”:{“upsertBucket”:null}}  
2024-10-14 11:16:40,147 WARNING MsgRouterThr:15652 [router.py:message\_loop():77] message\_loop has been closed_
2. **Debug-internal.log:**

_{“time”:“2024-10-14T11:16:39.6571469+02:00”,“level”:“INFO”,“msg”:“using version”,“core version”:“0.18.3”}  
{“time”:“2024-10-14T11:16:39.6571469+02:00”,“level”:“INFO”,“msg”:“created symlink”,“path”:“F:\ToothGroupNetwork\wandb\run-20241014\_111639-i5vb5pi5\logs\debug-core.log”}  
{“time”:“2024-10-14T11:16:39.667464+02:00”,“level”:“ERROR”,“msg”:“dialing: google: could not find default credentials. See … for more information”}  
{“time”:“2024-10-14T11:16:39.9300979+02:00”,“level”:“INFO”,“msg”:“created new stream”,“id”:“i5vb5pi5”}  
{“time”:“2024-10-14T11:16:39.9302162+02:00”,“level”:“INFO”,“msg”:“stream: started”,“id”:“i5vb5pi5”}  
{“time”:“2024-10-14T11:16:39.9302162+02:00”,“level”:“INFO”,“msg”:“writer: Do: started”,“stream\_id”:{“value”:“i5vb5pi5”}}  
{“time”:“2024-10-14T11:16:39.9303154+02:00”,“level”:“INFO”,“msg”:“sender: started”,“stream\_id”:{“value”:“i5vb5pi5”}}  
{“time”:“2024-10-14T11:16:39.9303154+02:00”,“level”:“INFO”,“msg”:“handler: started”,“stream\_id”:{“value”:“i5vb5pi5”}}  
{“time”:“2024-10-14T11:16:40.0765827+02:00”,“level”:“ERROR”,“msg”:“HTTP error”,“status”:403,“method”:“POST”,“url”:“[…”}](…  
{“time”:“2024-10-14T11:16:40.0765827+02:00”,“level”:“ERROR”,“msg”:“sender: upsertRun:”,“error”:“failed to upsert bucket: returned error 403 Forbidden: {“errors”:[{“message”:“permission denied”,“path”:[“upsertBucket”],“extensions”:{“code”:“PERMISSION\_ERROR”}}],“data”:{“upsertBucket”:null}}”}  
{“time”:“2024-10-14T11:16:40.1472315+02:00”,“level”:“INFO”,“msg”:“stream: closing”,“id”:“i5vb5pi5”}  
{“time”:“2024-10-14T11:16:40.2625221+02:00”,“level”:“ERROR”,“msg”:“HTTP error”,“status”:403,“method”:“POST”,“url”:“[…”}](…  
{“time”:“2024-10-14T11:16:40.2697548+02:00”,“level”:“ERROR”,“msg”:“sender: sendConfig:”,“error”:“returned error 403 Forbidden: {“errors”:[{“message”:“permission denied”,“path”:[“upsertBucket”],“extensions”:{“code”:“PERMISSION\_ERROR”}}],“data”:{“upsertBucket”:null}}”}  
{“time”:“2024-10-14T11:16:40.2711115+02:00”,“level”:“WARN”,“msg”:“No requirements.txt found, not creating job artifact. See […”}](…  
{“time”:“2024-10-14T11:16:40.2711115+02:00”,“level”:“INFO”,“msg”:“sender: sendDefer: no job artifact to save”}  
{“time”:“2024-10-14T11:16:40.3161557+02:00”,“level”:“ERROR”,“msg”:“HTTP error”,“status”:404,“method”:“POST”,“url”:“[…”}](…  
{“time”:“2024-10-14T11:16:40.3161557+02:00”,“level”:“ERROR”,“msg”:“runfiles: CreateRunFiles returned error: returned error 404 Not Found: {“errors”:[{“message”:“project bassfaye10/3d tooth mesh segmentation not found during createRunFiles”,“path”:[“createRunFiles”]}],“data”:{“createRunFiles”:null}}”}  
{“time”:“2024-10-14T11:16:40.4470144+02:00”,“level”:“ERROR”,“msg”:“HTTP error”,“status”:404,“method”:“POST”,“url1”:“[…”}](…  
{“time”:“2024-10-14T11:16:40.4470144+02:00”,“level”:“ERROR”,“msg”:“runfiles: CreateRunFiles returned error: returned error 404 Not Found: {“errors”:[{“message”:“project bassfaye10/3d tooth mesh segmentation not found during createRunFiles”,“path”:[“createRunFiles”]}],“data”:{“createRunFiles”:null}}”}  
{“time”:“2024-10-14T11:16:40.4471349+02:00”,“level”:“INFO”,“msg”:“fileTransfer: Close: file transfer manager closed”}  
{“time”:“2024-10-14T11:16:40.4472412+02:00”,“level”:“INFO”,“msg”:“handler: closed”,“stream\_id”:{“value”:“i5vb5pi5”}}  
{“time”:“2024-10-14T11:16:40.4472412+02:00”,“level”:“INFO”,“msg”:“writer: Close: closed”,“stream\_id”:{“value”:“i5vb5pi5”}}  
{“time”:“2024-10-14T11:16:40.4472412+02:00”,“level”:“INFO”,“msg”:“sender: closed”,“stream\_id”:{“value”:“i5vb5pi5”}}  
{“time”:“2024-10-14T11:16:40.4480132+02:00”,“level”:“INFO”,“msg”:“stream: closed”,“id”:“i5vb5pi5”}_  
Really appreciate your help,

---

<div class="post-metadata">

**Author:** ![m-majidpour](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@m-majidpour](https://community.wandb.ai/u/m-majidpour)\
**Post date:** [October 22, 2024, 6:33am UTC](https://community.wandb.ai/t/failed-to-upsert-bucket-returned-error-403-forbidden/8150/4 "2024-10-22T06:33:14Z")

</div>

I have the same issue on and off as well.  
Sometimes after I delete the .netrc file, it works and sometime it does not. Help is appreciated.

---

<div class="post-metadata">

**Author:** ![fogunsanya3](https://avatars.discourse-cdn.com/v4/letter/f/c57346/32.png) [@fogunsanya3](https://community.wandb.ai/u/fogunsanya3)\
**Post date:** [February 11, 2025, 3:02pm UTC](https://community.wandb.ai/t/failed-to-upsert-bucket-returned-error-403-forbidden/8150/5 "2025-02-11T15:02:00Z")

</div>

Hey I was running into the same error message. How were you able to get this resolved?

---

<div class="post-metadata">

**Author:** ![gusripama](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@gusripama](https://community.wandb.ai/u/gusripama)\
**Post date:** [March 5, 2026, 10:29am UTC](https://community.wandb.ai/t/failed-to-upsert-bucket-returned-error-403-forbidden/8150/6 "2026-03-05T10:29:10Z")

</div>

Hi everyone ,

I encountered a similar error, it might be a permission error when you try to initialize WandB in your python script.

When you do:

wandb.init(  
project=“My\_project,  
entity=“name\_of\_the\_users\_team”  
)

Check what you have as entity, you might change it with your personal one in your WandB profile website.

Go to the account settings in your WandB profile, under the name ‘group’ you should find your entity name to insert there!

I solved my problem in this way, I hope it helped!
