[dku.utils] - NameError: name 'dku' is not defined

Tina_liaddana
Level 2
[dku.utils] - NameError: name 'dku' is not defined

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

0 Kudos
6 Replies
Turribeach

Can you please post your Python recipe code using a code block? (it's the </> icon in the toolbar). Thanks

0 Kudos
Tina_liaddana
Level 2
Author
# -*- 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)
0 Kudos

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?

0 Kudos
Tina_liaddana
Level 2
Author

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"?

0 Kudos
Tina_liaddana
Level 2
Author

it gives the same error

0 Kudos