How to specify full path to project folder ?

LabKey Support Forum
How to specify full path to project folder ? ambarish nag  2022-05-31 21:52
Status: Active
 

Hi,
I am looking at the code example for creating a list domain in https://github.com/LabKey/labkey-api-python/blob/develop/samples/domain_example.py
If I want to add a subfolder to the project folder name, e.g.
project_name ="Study/Study1" then the code crashes with the error: labkey.exceptions.ServerContextError: '"403: You don't have permission to create a new domain"'
How can this problem be fixed ?
Thanks in advance.

 
 
mohara responded:  2022-06-06 10:00

Hi Ambarish:

You'd see that error when the user account (or apikey) you are using to authenticate your python script does not have permission to create a list in that Study1 subfolder. The syntax itself is fine and works when permissions are set to allow list creation.

If your script worked for project_name="Study" and doesn't work for "Study/Study1", check the permissions on that subfolder through the UI. I can reproduce your error message when the container exists, but the user account does not have list creation permission there. A second possibility is that if you are authenticating using a session key, it may have expired.

If neither of these resolves your issue, please send the end part of the labkey.log which will give more details about the error.

--Molly