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

typing-extension and pydantic version requirements #54

Open
wonjininfo opened this issue Jul 12, 2024 · 0 comments
Open

typing-extension and pydantic version requirements #54

wonjininfo opened this issue Jul 12, 2024 · 0 comments

Comments

@wonjininfo
Copy link
Collaborator

Hi,

I encountered an issue while updating my server to version 2.1.1, and here's how I resolved it.

During the update, I faced the following error:

<omitted>
 File "/home/kazu/miniconda3/envs/kazuenv/lib/python3.9/site-packages/spacy/tokens/_serialize.py", line 14, in <module>
    from ..vocab import Vocab
  File "spacy/vocab.pyx", line 1, in init spacy.vocab
  File "spacy/tokens/doc.pyx", line 49, in init spacy.tokens.doc
  File "/home/kazu/miniconda3/envs/kazuenv/lib/python3.9/site-packages/spacy/schemas.py", line 287, in <module>
    class TokenPattern(BaseModel):
  File "pydantic/main.py", line 299, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/fields.py", line 411, in pydantic.fields.ModelField.infer
  File "pydantic/fields.py", line 342, in pydantic.fields.ModelField.__init__
  File "pydantic/fields.py", line 451, in pydantic.fields.ModelField.prepare
  File "pydantic/fields.py", line 545, in pydantic.fields.ModelField._type_analysis
  File "pydantic/fields.py", line 550, in pydantic.fields.ModelField._type_analysis
  File "/home/kazu/miniconda3/envs/kazuenv/lib/python3.9/typing.py", line 852, in __subclasscheck__
    return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class

I resolved this by updating the Pydantic version from 1.8.2 to 1.10.17.

Here are the versions that work without any issues:

typing-extensions==4.12.2
pydantic==1.10.17
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

No branches or pull requests

1 participant