Python recipe execution error
I am trying to execute variables for coders hands-on code, and I have an error displayed below
and this is line 23
Best Answer
-
Sean Dataiker, Alpha Tester, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 168 Dataiker
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.
Answers
-
Sean Dataiker, Alpha Tester, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 168 Dataiker
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!
-
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
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
-
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
this is what is says
-
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
and i did nothing with the code.. i just copied it from the hands-on
-
Sean Dataiker, Alpha Tester, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 168 Dataiker
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. -
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
@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?
-
Sean Dataiker, Alpha Tester, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 168 Dataiker
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.
-
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
there is nothing here
-
Sean Dataiker, Alpha Tester, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 168 Dataiker
Hi @ManarAlmutairi
what instance are you using? Dataiku Online, the free locally-installed version, a company instance? -
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
i guess the free ver
-
Sean Dataiker, Alpha Tester, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 168 Dataiker
Hi @ManarAlmutairi
, click on the question mark in the top right. Click on "About". What does it say next to version? -
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
-
Sean Dataiker, Alpha Tester, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 168 Dataiker
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.html#create-a-code-environment
-
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
this is what i've done but still gives me an error
@SeanA -
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
@SeanA
.. is it possible to work on vs code editor instead? cuz i am working on a python recipe -
Sean Dataiker, Alpha Tester, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 168 Dataiker
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.
-
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
@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 -
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
aren't i using the free trial of DSS? if not how to start it?
-
Sean Dataiker, Alpha Tester, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 168 Dataiker
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.
-
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
finally its working!! thank you!
-
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
@SeanA
apologies but one more questionnow how to resolve this?
-
Sean Dataiker, Alpha Tester, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 168 Dataiker
Hi @ManarAlmutairi
what action prompted this error? -
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
i am working on "variables for coders" hands-on.. just wanted to execute the code
-
Sean Dataiker, Alpha Tester, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 168 Dataiker
Right, and this is the first time you build the Flow or have you edited the code in the Python recipe?
-
ManarAlmutairi Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 20 ✭✭✭
I just edited the code receipe
-
Sean Dataiker, Alpha Tester, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer Posts: 168 Dataiker
The first step in the tutorial after creating the project and changing the code environment is to build the Flow (before changing anything in the python recipe). Did this succeed? That is, do you have the scatterplot in the final folder?