-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pydantic error #434
Comments
Hi @shoepfl, |
Thanks @matthiaskoenig, i succeeded with pydantic 1.10.2 Best, |
We also had this issue, which was causing tests to fail. We fixed this by downgrading pydantic to <2.0. |
This is fixed in the latest version 0.8.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Matthias,
currently I get a pydantic error, when using sbmlutils 0.8.4:
UserWarning: Field "model_units" has conflict with protected namespace "model_".
You may be able to resolve this warning by setting
model_config['protected_namespaces'] = ()
.warnings.warn(
/home/basti/miniconda3/envs/sbmlutils/lib/python3.11/site-packages/pydantic/_internal/fields.py:127: UserWarning: Field "model_definitions" has conflict with protected namespace "model".
You may be able to resolve this warning by setting
model_config['protected_namespaces'] = ()
.warnings.warn(
───────────────────────────────────────────────────────────────────────────────────── Create SBML ──────────────────────────────────────────────────────────────────────────────────────
Traceback (most recent call last):
File "/mnt/c/Users/basti/Documents/Uni/11_Doktorarbeit/Python/BayModTS/test.py", line 74, in
results = create_model(
^^^^^^^^^^^^^
File "/home/basti/miniconda3/envs/sbmlutils/lib/python3.11/site-packages/sbmlutils/factory.py", line 3619, in create_model
m = Model.merge_models(model)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/basti/miniconda3/envs/sbmlutils/lib/python3.11/site-packages/sbmlutils/factory.py", line 3445, in merge_models
kind = m2._keys.get(key, None)
^^^^^^^^
File "/home/basti/miniconda3/envs/sbmlutils/lib/python3.11/site-packages/pydantic/main.py", line 711, in getattr
return self.pydantic_private[item] # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/basti/miniconda3/envs/sbmlutils/lib/python3.11/site-packages/pydantic/main.py", line 715, in getattr
pydantic_extra = object.getattribute(self, 'pydantic_extra')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Model' object has no attribute 'pydantic_extra'. Did you mean: 'pydantic_complete'?
The error occours now in the file I already sent you for the RTD function:
test.py.txt
for me this seems to be a problem with my dependencies - can you help me here?
Thanks, Sebastian
The text was updated successfully, but these errors were encountered: