Matthieu Oliveira
06/12/2023, 8:41 PMKeyError: '_data_store'
File ".python3.8/site-packages/lakefs_client/model_utils.py", line 189, in __getattr__
return self.__getitem__(attr)
File "./python3.8/site-packages/lakefs_client/model_utils.py", line 521, in __getitem__
if name in self:
File "./python3.8/site-packages/lakefs_client/model_utils.py", line 535, in __contains__
return name in self.__dict__['_data_store']
Is it possible to help me understand why this would happen? For slightly more context, I execute a script and this happens every other time I run the script.. I'm led to beileve the trace of this error starts here:
from lakefs_client import models
__setstate__
Barak Amar
python3
Python 3.11.3 (main, Apr 7 2023, 20:13:31) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from lakefs_client import models
>>>
Matthieu Oliveira
06/12/2023, 9:23 PMKeyError: '_data_store'
Stack Trace:
File "./python3.8/site-packages/dagster/_core/execution/plan/utils.py", line 54, in op_execution_error_boundary
yield
File "./python3.8/site-packages/dagster/_core/execution/plan/inputs.py", line 819, in _load_input_with_input_manager
value = input_manager.load_input(context)
File "./python3.8/site-packages/dagster/_core/storage/upath_io_manager.py", line 191, in load_input
return self._load_single_input(path, context)
File "./python3.8/site-packages/dagster/_core/storage/upath_io_manager.py", line 134, in _load_single_input
obj = self.load_from_path(context=context, path=path)
File "./python3.8/site-packages/dagster/_core/storage/fs_io_manager.py", line 173, in load_from_path
return pickle.load(file)
File "./python3.8/site-packages/lakefs_client/model_utils.py", line 189, in __getattr__
return self.__getitem__(attr)
File "./python3.8/site-packages/lakefs_client/model_utils.py", line 521, in __getitem__
if name in self:
File "./python3.8/site-packages/lakefs_client/model_utils.py", line 536, in __contains__
return name in self.__dict__['_data_store']
It's possible it's an issue with dagster but maybe this will helpBarak Amar
from lakefs_client.model.diff_list import DiffList
Matthieu Oliveira
06/12/2023, 9:23 PMBarak Amar
import all models into this package (models).
if you have many models here with many references from one model to another this may
raise a RecursionError
to avoid this, import only the models that you directly need like:
from from lakefs_client.model.pet import Pet (example)
or import this package, but before doing it, use:
import sys
sys.setrecursionlimit(n)
Ariel Shaqed (Scolnicov)
06/13/2023, 4:24 AMMatthieu Oliveira
06/13/2023, 9:04 AMfrom lakefs_client.model.commit_creation import CommitCreation
with lakefs_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = commits_api.CommitsApi(api_client)
repository = "my-repo"
branch = "main"
commit_creation = CommitCreation(
message="my-example",
metadata={
"key": "my-value",
},
date='06-13-2023',
)
and this snippet commits.. so going to replace what's breaking with this and see if this works