Error while deploying python script using API Deployer

Usersyed
Usersyed Partner, Registered Posts: 29 Partner

Hi all,

I am trying to deploy a python script as an API using Dataiku's API deployer and running into this error while running my test query.

Attached is the screenshot of the error.

I did try using dataikuapi and mentioning the client and apikey but none of it worked.

Also tried mentioning
os.environ["DKU_CURRENT_PROJECT_KEY"] = "PROJECT_ID"

but then ended up getting this error "No DSS URL or API key found from any location"
Can anyone please help me to resolve this?error.PNG


Operating system used: Windows

Best Answer

Answers

  • Usersyed
    Usersyed Partner, Registered Posts: 29 Partner

    Thanks @ZachM
    .

    I was trying to access files from one of the managed folders and the way I was accessing it was using get_path() but it looks like while accessing folder in scripts that are being deployed as an API.

    folder_path = folders[0] or folders[1] based on which folder you are accessing is to be used.

    Thanks for the solution!

Setup Info
    Tags
      Help me…