Permission Error

Hi all,
I am totally new to wandb and when running my code I get the following error:
Traceback (most recent call last):
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/sdk/wandb_init.py”, line 996, in init
wi.setup(kwargs)
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/sdk/wandb_init.py”, line 237, in setup
wandb_login._login(
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/sdk/wandb_login.py”, line 297, in _login
wlogin.prompt_api_key()
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/sdk/wandb_login.py”, line 220, in prompt_api_key
key, status = self._prompt_api_key()
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/sdk/wandb_login.py”, line 197, in _prompt_api_key
api = Api(self._settings)
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/sdk/internal/internal_api.py”, line 74, in init
self._settings = Settings(
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/old/settings.py”, line 23, in init
self._global_settings.read([Settings._global_path()])
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/old/settings.py”, line 110, in _global_path
util.mkdir_exists_ok(config_dir)
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/util.py”, line 854, in mkdir_exists_ok
os.makedirs(path)
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/os.py”, line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/os.py”, line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/os.py”, line 223, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: ‘/home/mahzad-khosh’
wandb: ERROR Abnormal program exitTraceback (most recent call last):
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/sdk/wandb_init.py”, line 996, in init
wi.setup(kwargs)
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/sdk/wandb_init.py”, line 237, in setup
wandb_login._login(
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/sdk/wandb_login.py”, line 297, in _login
wlogin.prompt_api_key()
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/sdk/wandb_login.py”, line 220, in prompt_api_key
key, status = self._prompt_api_key()
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/sdk/wandb_login.py”, line 197, in _prompt_api_key
api = Api(self._settings)
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/sdk/internal/internal_api.py”, line 74, in init
self._settings = Settings(
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/old/settings.py”, line 23, in init
self._global_settings.read([Settings._global_path()])
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/old/settings.py”, line 110, in _global_path
util.mkdir_exists_ok(config_dir)
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/site-packages/wandb/util.py”, line 854, in mkdir_exists_ok
os.makedirs(path)
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/os.py”, line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/os.py”, line 213, in makedirs
makedirs(head, exist_ok=exist_ok)
File “/z/home/mahzad-khosh/env/romp2/lib/python3.8/os.py”, line 223, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: ‘/home/mahzad-khosh’
wandb: ERROR Abnormal program exit

When initializing wandb I set the dir to path = “/z/home/mahzad-khosh/Human_object_transform/wandb” which I am sure has permission to write.
Also I do
export WANDB_DIR=/z/home/mahzad-khosh/Human_object_transform/wandb
in my submit script.
Any tip on how I can avoid this error?

Thanks,

Hi @mkhoshle,

Looks like the makedirs function is trying to create directories in the folder /home/mahzad-khosh, could you share the init command you ran when you tried to initialize the dir?

Additionally, what version of wandb are you currently running? This will let me know next steps on how to debug this for you.

Thanks,
Ramit

Hi,

I added these three lines to my submit script and it is working now!

export WANDB_CONFIG_DIR=/z/home/mahzad-khosh/Human_object_transform/wandb
export WANDB_DIR=/z/home/mahzad-khosh/Human_object_transform/wandb
export WANDB_CACHE_DIR=/z/home/mahzad-khosh/Human_object_transform/wandb

Thank you,

1 Like