Closed jarq6c closed 10 months ago
The following call to get fails with a StoreNotFoundError.
get
StoreNotFoundError
from hydrotools.nwm_client_new.NWMFileClient import NWMFileClient from hydrotools.nwm_client_new.ParquetStore import ParquetStore my_custom_store = ParquetStore( "my_custom_store.parquet", write_index=False, compression="snappy" ) model_data_client = NWMFileClient(dataframe_store=my_custom_store) forecast_data = model_data_client.get( configurations = ["short_range"], reference_times = ["20210101T01Z"], nwm_feature_ids = [724696] )
The issue is this line: https://github.com/NOAA-OWP/hydrotools/blob/b7baa7b0691374a1b99c06675631d82fd0f8cafc/python/nwm_client_new/src/hydrotools/nwm_client_new/NWMFileClient.py#L183
ParquetStore has no __bool__ dunder method, so it always evaluates to False. I'm not sure why this doesn't fail with the default dataframe_store argument.
ParquetStore
__bool__
False
dataframe_store
The following call to
get
fails with aStoreNotFoundError
.The issue is this line: https://github.com/NOAA-OWP/hydrotools/blob/b7baa7b0691374a1b99c06675631d82fd0f8cafc/python/nwm_client_new/src/hydrotools/nwm_client_new/NWMFileClient.py#L183
ParquetStore
has no__bool__
dunder method, so it always evaluates toFalse
. I'm not sure why this doesn't fail with the defaultdataframe_store
argument.