Train Model error : : 'ObjectBlock' object has no attribute 'is_datetimetz'

mazen
mazen Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 2 Partner
edited July 16 in Using Dataiku

hello,

i have tried to train my model while following the dataiku academy project : scoring basics

but i get this error everytime :

AttributeError: 'ObjectBlock' object has no attribute 'is_datetimetz'

and when i check logs :

[2022/03/01-09:39:17.055] [MRT-5262] [INFO] [dku.block.link.interaction]  - Check result for nullity exceptionIfNull=true result=null
Traceback (most recent call last):
  File "/media/data/dataiku/dataiku-dss-9.0.1/python/dataiku/doctor/server.py", line 46, in serve
    ret = api_command(arg)
  File "/media/data/dataiku/dataiku-dss-9.0.1/python/dataiku/doctor/dkuapi.py", line 45, in aux
    return api(**kwargs)
  File "/media/data/dataiku/dataiku-dss-9.0.1/python/dataiku/doctor/commands.py", line 326, in train_prediction_models_nosave
    preprocessing_params)
  File "/media/data/dataiku/dataiku-dss-9.0.1/python/dataiku/doctor/prediction_entrypoints.py", line 154, in prediction_train_score_save
    .draw_and_save_background_rows(test_df_no_normalization.loc[not_dropped_index], score_to_explain_df)
  File "/media/data/dataiku/dataiku-dss-9.0.1/python/dataiku/doctor/prediction/background_rows_handler.py", line 60, in draw_and_save_background_rows
    header=False, index=False).save()
  File "/media/data/dataiku/dataiku-dss-9.0.1/python/dataiku/core/dku_pandas_csv.py", line 197, in save
    self._save()
  File "/media/data/dataiku/dataiku-dss-9.0.1/python/dataiku/core/dku_pandas_csv.py", line 296, in _save
    self._save_chunk(start_i, end_i)
  File "/media/data/dataiku/dataiku-dss-9.0.1/python/dataiku/core/dku_pandas_csv.py", line 307, in _save_chunk
    if b.is_datetimetz:
AttributeError: 'ObjectBlock' object has no attribute 'is_datetimetz'

tried to change my python env yet it doesn't work.

Thank you in advance,


Operating system used: windows

Best Answer

  • Vitaliy
    Vitaliy Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer Posts: 102 Dataiker
    edited July 17 Answer ✓

    Hi,

    The AttributeError: 'ObjectBlock' object has no attribute 'is_datetimetz' suggests there may be a Pandas version mismatch. The panda version in your code environment may not be supported.

    Can you please confirm what version of Pandas and Python do you currently have installed in the code environment that produces this error:

    You can check in the Python notebook :

    from platform import python_version
    import pandas as pd
    
    print(python_version())
    print(pd.__version__)

    If it's > Pandas 1 and you are using Python3.6+. You will need to downgrade pandas==1.0.5. For more information around supported Pandas, versions see: https://doc.dataiku.com/dss/latest/code_recipes/python.html#using-pandas

    If the issues persist after downgrading panda's version or if the Pandas version already looks correct. Please open a support ticket and provide the following:

    1) Provide full training model logs (not just an error snippet).

    2) Generate a diagnostic of the DSS instance (Administration > Maintenance > Diagnostic tool) and send us the resulting file? Note that you need to be the administrator of the DSS instance - else, you'll need to ask your admin.

    If the resulting files are too large for mail (> 15 MB), you can use https://dl.dataiku.com to send it to us. Please don't forget to send the link that is generated when you upload the file.

    Best,

    Vitaliy

Setup Info
    Tags
      Help me…