Want to Stop Rebuilding "Expensive" Parts of your Flow? Explicit Builds are the Answer!READ MORE

Python recipe execution error

Solved!
ManarAlmutairi
Level 2
Python recipe execution error

I am trying to execute variables for coders hands-on code, and I have an error displayed below

Screen Shot 2022-09-08 at 9.57.48 PM.png

and this is  line 23 

Screen Shot 2022-09-08 at 9.58.09 PM.png

0 Kudos
1 Solution
SeanA
Community Manager
Community Manager

Hi @ManarAlmutairi this screenshot shows that Python 3.6 is not installed on your system. You would need to install Python 3.6. Or when you click "New Python Env", you can choose another version of Python that you do have. 

Alternatively, you can start a free trial of Dataiku Online, in which Dataiku manages the Python environment for you, and you can just choose the dash environment.

Dataiku

View solution in original post

27 Replies
SeanA
Community Manager
Community Manager

Hi @ManarAlmutairi , did the initial build of the Flow succeed? That is, you have a scatterplot for the US? This would mean you have no code environment issues. If that succeeded, there are a few steps you could have missed:

- defining the variables

- adding 1 line of code

- changing 1 line of code

Let us know if that helps!

Dataiku
0 Kudos
ManarAlmutairi
Level 2
Author

i think i have a problem with setting the environment.. how to set it? cuz I've been trying to set a new python environment from the settings but it won't work @SeanA 

0 Kudos
ManarAlmutairi
Level 2
Author

Screen Shot 2022-09-09 at 12.06.23 PM.png

 this is what is says

0 Kudos
ManarAlmutairi
Level 2
Author

and i did nothing with the code.. i just copied it from the hands-on

0 Kudos
SeanA
Community Manager
Community Manager

Hi @ManarAlmutairi , your problem is the code environment. You'll see in the instructions that this tutorial requires certain Python packages in order to run successfully. We have a lot of documentation on how to set code environments depending on your instance. This tutorial is one example. If you're using Dataiku Online, you just need to switch to the "dash" code environment.

Dataiku
0 Kudos
ManarAlmutairi
Level 2
Author

@SeanA  thank you for your reply! I tried to follow the document you've attached and still not working. 

Can you please walk me through the steps to switch to dash environment?

0 Kudos
SeanA
Community Manager
Community Manager

Hi @ManarAlmutairi , if you are using Dataiku Online, then:

- Go to the top navigation bar. 

- Go to the More Options (3 dots menu)

- Click on Settings.

- Click on "Code env selection".

- For default Python code env, change the Mode to "Select an environment". 

- Choose "dash" as the environment. 

- Click Save.

Dataiku
0 Kudos
ManarAlmutairi
Level 2
Author

Screen Shot 2022-09-09 at 6.37.25 PM.png

there is nothing here 

0 Kudos
SeanA
Community Manager
Community Manager

Hi @ManarAlmutairi what instance are you using? Dataiku Online, the free locally-installed version, a company instance?

Dataiku
0 Kudos
ManarAlmutairi
Level 2
Author

i guess the free ver

0 Kudos
SeanA
Community Manager
Community Manager

Hi @ManarAlmutairi , click on the question mark in the top right. Click on "About". What does it say next to version?

Dataiku
0 Kudos
ManarAlmutairi
Level 2
Author

Screen Shot 2022-09-09 at 6.53.35 PM.png

0 Kudos
SeanA
Community Manager
Community Manager

Hi @ManarAlmutairi , so yes this is indeed the free locally-installed version. In which case you are the admin of the instance. And you have to create any needed code environments yourself. 

You need to create a new Python code environment with the matplotlib package. You can find example of how to do so here: https://knowledge.dataiku.com/latest/courses/advanced-code/code-in-dss/code-environments-hands-on.ht...

Dataiku
0 Kudos
ManarAlmutairi
Level 2
Author

this is what i've done but still gives me an error 😞 @SeanA 

Screen Shot 2022-09-09 at 6.59.01 PM.png

0 Kudos
ManarAlmutairi
Level 2
Author

@SeanA .. is it possible to work on vs code editor instead? cuz i am working on a python recipe

0 Kudos
SeanA
Community Manager
Community Manager

Hi @ManarAlmutairi , you can write the actual code outside of Dataiku (such as in VS Code-- there are different integrations for this). But to run the code within Dataiku (to run the recipe), you will need that package present in the code env.

When you try to create the code env, can you download and send the logs? You'll see a panel for it on the left.

Dataiku
0 Kudos
ManarAlmutairi
Level 2
Author

@SeanA  pardon me, do you mean log files in the Maintenance tab? if so which file? because there is nothing appearing on the left panel of creating env option

Screen Shot 2022-09-09 at 8.00.15 PM.png

0 Kudos
SeanA
Community Manager
Community Manager

Hi @ManarAlmutairi this screenshot shows that Python 3.6 is not installed on your system. You would need to install Python 3.6. Or when you click "New Python Env", you can choose another version of Python that you do have. 

Alternatively, you can start a free trial of Dataiku Online, in which Dataiku manages the Python environment for you, and you can just choose the dash environment.

Dataiku
ManarAlmutairi
Level 2
Author

aren't i using the free trial of DSS? if not how to start it?

0 Kudos
SeanA
Community Manager
Community Manager

Hi @ManarAlmutairi , you are using the free edition locally installed on your machine. That one is free forever for you to use!

Dataiku Online is a managed version of Dataiku's software. When you go to this page, the first option you'll see is for the 14 day free trial. This is where to sign up for Dataiku Online (where Dataiku will manage the Python environment).

Beneath that, it says "Install the Free Edition" and "Select your System". That's the one you have.

 

Dataiku
0 Kudos

Labels

?
Labels (2)