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

cannot import name 'schema_json_of' from 'pydantic' #70

Closed
numb3r3 opened this issue Jan 21, 2022 · 0 comments
Closed

cannot import name 'schema_json_of' from 'pydantic' #70

numb3r3 opened this issue Jan 21, 2022 · 0 comments

Comments

@numb3r3
Copy link
Contributor

numb3r3 commented Jan 21, 2022

We need explicitly add the dependency pydantic>=1.9.0 in setup.py. With pydantic==1.8.2, the following error is throw

$ pytest tests/unit/test_pydantic.py
cls = <class 'docarray.array.document.DocumentArray'>, indent = 2

    @classmethod
    def get_json_schema(cls, indent: int = 2) -> str:
        """Return a JSON Schema of DocumentArray class."""
>       from pydantic import schema_json_of
E       ImportError: cannot import name 'schema_json_of' from 'pydantic' (/Users/fengwang/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pydantic/__init__.cpython-38-darwin.so)

docarray/array/mixins/pydantic.py:13: ImportError
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.

2 participants