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

Unable to generate pydantic-core schema for <class 'memoryview'> #55

Open
sbking opened this issue Aug 23, 2024 · 0 comments · May be fixed by #56
Open

Unable to generate pydantic-core schema for <class 'memoryview'> #55

sbking opened this issue Aug 23, 2024 · 0 comments · May be fixed by #56

Comments

@sbking
Copy link

sbking commented Aug 23, 2024

When generating a pydantic model that includes a BYTEA column in postgres, it has a memoryview attribute that causes this error:

pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'memoryview'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.

Should it be bytes instead?

@sbking sbking linked a pull request Aug 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant