Python notebook failed export to dataiku : NullPointerException error

robinsarfati
robinsarfati Registered Posts: 2 ✭✭✭✭
edited July 16 in Using Dataiku

I am writing a python notebook within a project but I get an error when trying to export it to dataiku with panda dataframe.

The error is the following:


Exception: An error occurred during dataset write (6oh2RgiLQn): NullPointerException: null

and this despite the fact I precede with the following code:


result = pd.DataFrame(my_array_to_export)
dss_runs = dataiku.Dataset("my_export")
dss_runs.write_with_schema(result)

EDIT: here is the configuration of the my_export dataset created in the project:

Answers

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭
    Hi,

    As explained by larispardo, this normally works without any issue if the dataframe that you write with the .write_with_schema() method is valid and if the dataset exists in the flow. Maybe inspect the result dataframe using

    from dataiku import pandasutils as pdu

    pdu.audit(result)

    Could you try restarting your notebook kernel and relaunching the code blocks involved?

    Cheers,

    Alex
  • robinsarfati
    robinsarfati Registered Posts: 2 ✭✭✭✭
    I had to reset a project from scratch and follow larispardo steps to make it work. pud.audit is very useful thanks for your help !
Setup Info
    Tags
      Help me…