Grader return with 'name 'DATA_PATH' is not defined

Hi,

I have completed the last graded lab for “Sequences, Time Series and Prediction” course with MSE and MAE below the stated limits. However, when I submitted my assignment, the grader report the following:

Failed test case: There was an error evaluating parse_data_from_file function.
Expected:
No exceptions,
but got:
name ‘DATA_PATH’ is not defined.

Obviously, DATA_PATH is defined and initialised in my Jupyter Notebook environment. But perhaps that’s not the case in the grader environment.

Please advice.
Thanks

hi @osyafriza

Such data_path error can happen if you are using incorrect arguments or codes to recall the data to be used for assignment notebook.

make sure you are not using a global recall variables.

this grader failure can also happen if you hard coded the path too

If not able to find the issue with parse data, then kindly only DM screenshot of the code related to the grade cell you failed i.e. parse data by personal DM.

Regards
DP

Yes, my bad. I was using global variable DATA_PATH instead of the passed parameter in my parse_data_from_file method.

Thanks for your help DP

1 Like