Python Recipe error
Hi,
I have created a python recipe with Input & Output as Managed Folder, please find below SS for the same.
So when i am trying to building this recipe its showing me the Name error, i will share the diagnostics for it with this ticket.
Operating system used: Windows
Operating system used: Windows
Answers
-
Miguel Angel Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 118 Dataiker
Hi,
The error is telling us a variable/function is being called before being declared:
NameError: name 'GE_DataSourceCreation' is not defined
In Line 78 of your script there is a call for 'GE_DataSourceCreation'. However, this function's declaration starts at line 84. The general rule in Python is that a function should be defined before its usage. Please move that function's declaration block further above in the code.
-
Hi,
Thanks Let me try that and get back to you if needed help.
-
Hi,
I tried your solution with moving function declaration further above in the code, still experiencing same error.
Thanks,
Sourabh
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,088 Neuron
The function is still below the code:
This function should be moved to the top of the recipe. Please avoid posting diagnostics files here as they can have some confidential information. I would suggest you remove the ones you posted on this thread already.