[dku.utils] - NameError: name 'dku' is not defined
Tina_liaddana
Registered Posts: 9 ✭
Hello,
I tried to run a python recipe and I got the error: [dku.utils] - NameError: name 'dku' is not defined
Here is the full job log.
Thanks for your help
Answers
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,992 Neuron
Can you please post your Python recipe code using a code block? (it's the </> icon in the toolbar). Thanks
-
# -*- coding: utf-8 -*- # LIBRAIRIES & PACKAGES import pandas as pd import numpy as np import warnings import dataiku from dataiku import pandasutils as pdu warnings.filterwarnings("ignore", category=pd.core.common.SettingWithCopyWarning) from multi_class_analyse_drg import AnalyseDRG_multiplewindow #define parameters multi_scan_parameters = dataiku.get_custom_variables() print (multi_scan_parameters) print (type(multi_scan_parameters)) for k, v in multi_scan_parameters.items(): exec(f"{k} = v") my_analyse = AnalyseDRG_multiplewindow("data_prepared") _ = [my_analyse.c_study(code,kind_of_date, procedure = procedure, list_windows = list_windows, N_last_days = N_last_days, alpha_scan=alpha_scan) for code in my_analyse.list_code] df = my_analyse.res["c_study"] df = df[df[code]["suspicious_nitg"] > 0 and df[code]["results"]["n_tot"] > min_n_tot] # Write recipe outputs alertes = dataiku.Dataset("alertes") alertes.write_with_schema(df)
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,992 Neuron
Your recipe is running in a kubernetes container which makes it harder to see the actual error. Can you try to run it in the DSS server to see if it works or gives an error?
-
in order to run it in the dss server, what shall I do exaclty?
is it to select the behavior as "None - use backend to execute"?
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,992 Neuron
Yes.
-
it gives the same error