Skip to content
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

AttributeError: module 'pydantic_core' has no attribute 'TuplePositionalSchema' #167

Closed
maurosilber opened this issue Jan 29, 2024 · 2 comments
Labels
bug Something isn't working v2 Version 2 related

Comments

@maurosilber
Copy link
Contributor

maurosilber commented Jan 29, 2024

Installing and running pydantic-xml on a new environment raises this error:

.../lib/python3.10/site-packages/pydantic_xml/serializers/factories/heterogeneous.py:14: in ElementSerializer
    def from_core_schema(cls, schema: pcs.TuplePositionalSchema, ctx: Serializer.Context) -> 'ElementSerializer':
.../lib/python3.10/site-packages/pydantic_core/core_schema.py:3974: in __getattr__
    raise AttributeError(f"module 'pydantic_core' has no attribute '{attr_name}'")
E   AttributeError: module 'pydantic_core' has no attribute 'TuplePositionalSchema'. Did you mean: 'tuple_positional_schema'?

They seem to have removed that class in this commit: pydantic/pydantic-core@4df7624

It works with pydantic_core < 2.16 and pedantic < 2.6.

maurosilber added a commit to maurosilber/biomodels that referenced this issue Jan 29, 2024
@gizmo84
Copy link

gizmo84 commented Jan 30, 2024

Same here since the release of pydantic 2.6.0

@dapper91 dapper91 added bug Something isn't working v2 Version 2 related labels Feb 3, 2024
@dapper91
Copy link
Owner

dapper91 commented Feb 3, 2024

fixed in version 2.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2 Version 2 related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants