Community Conundrum 28: News Engagement is live! Read More

Dataiku Plugin Code Environment Not Properly Setup

Level 1
Dataiku Plugin Code Environment Not Properly Setup

I'm creating a plugin that requires calls to an API and I need to install a specific version of the package for my plugin. 

When creating a plugin, I set up a code environment, and in the desc.json, include the necessary fields. 

{
  "acceptedPythonInterpreters": ["PYTHON36"],
  "forceConda": false,
  "installCorePackages": true,
  "installJupyterSupport": false
}

 

Inside of my requirements.txt, I also have the specific package instructions. 

When I run the plugin inside of a project, the API is being called to a different package than the one requested. Looking back at the plugin summary, I notice this warning:

Capture.JPG

 

Is there a way I can ensure I am setting up the environment properly?

0 Kudos
4 Replies
Dataiker
Dataiker

Hi, 

After defining the plugin code-env, have you built it from the "Summary" section of the plugin ? You should have a part of the screen looking like this :

Screenshot 2020-11-19 at 18.12.32.png

If you click on "create a new one", DSS will build a code env according to your specs and attach it to the plugin. Note that the plugin execution will fail until the necessary code env is built.

0 Kudos
Level 1
Author

Yes, though is there any documentation on what is required to build to the specs? I've included the interpreter specification in desc.json and the necessary packages in requirements.txt yet I still receive that notification. 

0 Kudos

Hi, 

The plugin code-env documentation is accessible here: https://doc.dataiku.com/dss/latest/plugins/reference/other.html#code-environments you will see that in the spec folder you just need a requirements.txt file with requirements written as you would do in a regular code env in DSS. Your desc.json file looks fine to me.

If you need more plugin examples, feel free to have a look at this github public repo: https://github.com/dataiku/dataiku-contrib containing DSS plugins. A code env example can be found here: https://github.com/dataiku/dataiku-contrib/tree/master/googlesheets.

Which package are you trying to install ?

0 Kudos
Level 1
Author

The package is googleads==26.0.0

0 Kudos
A banner prompting to get Dataiku DSS