mascai
mascai

Reputation: 1872

FeatureStore: 'NoneType' object has no attribute 'utctimetuple'

I am using feast library

And I am creating FeatureStore object in my script:

def get_feature_store(config: Dict[str, str]):
    spark_conf = read_spark_conf(config["spark_config_master_path"])
    online_host, online_port = config["online_store_connection"].split(":")
    print(spark_conf)
    repo_config = RepoConfig(
        project=config["project_name"],
        # spark.engine
        provider="local",
        batch_engine={
            "type": "pim_spark.engine",
            "partitions": 1000
        },
        process_dt=config["process_dt"],
        distinct=(config["distinct"].lower() == "true"),
        update_all=(config["update_all"].lower() == "true"),
        run_validate_flag=(config["run_validate_flag"].lower() == "true"),
        last_part_name=config["last_part_name"],
        registry=RegistryConfig(
            registry_type="sql",
            path=f"postgresql://{config['registry_user']}:{config['registry_password']}@{config['registry_connection']}",
            cache_ttl_seconds=3,
        ),

        offline_store=SparkOfflineStoreConfig(
            type="spark",
            spark_conf=spark_conf,
        ),
        online_store=PostgreSQLOnlineStoreConfig(
            type="postgres",
            host=online_host,
            port=online_port,
            database=config["online_store_database"],
            db_schema=config["online_store_database_schema"],
            user=config["online_store_user"],
            password=config["online_store_password"],
            sslmode=None,
            sslkey_path=None,
            sslcert_path=None,
            sslrootcert_path=None,
        ),
        entity_key_serialization_version=2,  # value of 2 uses a newer serialization scheme, supported as of Feast 0.23.

    )
    return FeatureStore(config=repo_config)

I have an error:

File "fs_runner.py", line 160, in run_demo
    store = get_feature_store(config)
  File "fs_runner.py", line 87, in get_feature_store
    return FeatureStore(config=repo_config)
  File "/srv/data10/hadoop/yarn/nm/usercache/tuz_dapp_p0_lab_ppml/appcache/application_1733519374776_597720/container_e82_1733519374776_597720_01_000001/feast_dapp_venv.zip/feast-venv/lib/python3.8/site-packages/feast/usage.py", line 362, in wrapper
    raise exc.with_traceback(traceback)
  File "/srv/data10/hadoop/yarn/nm/usercache/tuz_dapp_p0_lab_ppml/appcache/application_1733519374776_597720/container_e82_1733519374776_597720_01_000001/feast_dapp_venv.zip/feast-venv/lib/python3.8/site-packages/feast/usage.py", line 348, in wrapper
    return func(*args, **kwargs)
  File "/srv/data10/hadoop/yarn/nm/usercache/tuz_dapp_p0_lab_ppml/appcache/application_1733519374776_597720/container_e82_1733519374776_597720_01_000001/feast_dapp_venv.zip/feast-venv/lib/python3.8/site-packages/feast/feature_store.py", line 169, in __init__
    self._registry = SqlRegistry(registry_config, None)
  File "/srv/data10/hadoop/yarn/nm/usercache/tuz_dapp_p0_lab_ppml/appcache/application_1733519374776_597720/container_e82_1733519374776_597720_01_000001/feast_dapp_venv.zip/feast-venv/lib/python3.8/site-packages/feast/infra/registry/sql.py", line 198, in __init__
    self.cached_registry_proto = self.proto()
  File "/srv/data10/hadoop/yarn/nm/usercache/tuz_dapp_p0_lab_ppml/appcache/application_1733519374776_597720/container_e82_1733519374776_597720_01_000001/feast_dapp_venv.zip/feast-venv/lib/python3.8/site-packages/feast/infra/registry/sql.py", line 824, in proto
    r.last_updated.FromDatetime(max(last_updated_timestamps))
  File "/srv/data10/hadoop/yarn/nm/usercache/tuz_dapp_p0_lab_ppml/appcache/application_1733519374776_597720/container_e82_1733519374776_597720_01_000001/feast_dapp_venv.zip/feast-venv/lib/python3.8/site-packages/google/protobuf/internal/well_known_types.py", line 249, in FromDatetime
    self.seconds = calendar.timegm(dt.utctimetuple())
AttributeError: 'NoneType' object has no attribute 'utctimetuple'

How to understand what is wrong with my config and how to fix it?

Upvotes: 0

Views: 25

Answers (0)

Related Questions