You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by LuoXiaoxi-cxq September 26, 2024
I was running the training part of the [self-attentive-parser] (https://github.com/nikitakit/self-attentive-parser), where I met this error (probably caused by version problems of spacy and pydantic):
Traceback (most recent call last):
File "D:\postgraduate\research\parsing\self-attentive-parser\src\main.py", line 11, in <module>
from benepar import char_lstm
File "D:\postgraduate\research\parsing\self-attentive-parser\src\benepar\__init__.py", line 20, in <module>
from .integrations.spacy_plugin import BeneparComponent, NonConstituentException
File "D:\postgraduate\research\parsing\self-attentive-parser\src\benepar\integrations\spacy_plugin.py", line 5, in <module>
from .spacy_extensions import ConstituentData, NonConstituentException
File "D:\postgraduate\research\parsing\self-attentive-parser\src\benepar\integrations\spacy_extensions.py", line 177, in <module>
install_spacy_extensions()
File "D:\postgraduate\research\parsing\self-attentive-parser\src\benepar\integrations\spacy_extensions.py", line 153, in install_spacy_extensions
from spacy.tokens import Doc, Span, Token
File "D:\anaconda\lib\site-packages\spacy\__init__.py", line 14, in <module>
from . import pipeline # noqa: F401
File "D:\anaconda\lib\site-packages\spacy\pipeline\__init__.py", line 1, in <module>
from .attributeruler import AttributeRuler
File "D:\anaconda\lib\site-packages\spacy\pipeline\attributeruler.py", line 6, in <module>
from .pipe import Pipe
File "spacy\pipeline\pipe.pyx", line 8, in init spacy.pipeline.pipe
File "D:\anaconda\lib\site-packages\spacy\training\__init__.py", line 11, in <module>
from .callbacks import create_copy_from_base_model # noqa: F401
File "D:\anaconda\lib\site-packages\spacy\training\callbacks.py", line 3, in <module>
from ..language import Language
File "D:\anaconda\lib\site-packages\spacy\language.py", line 25, in <module>
from .training.initialize import init_vocab, init_tok2vec
File "D:\anaconda\lib\site-packages\spacy\training\initialize.py", line 14, in <module>
from .pretrain import get_tok2vec_ref
File "D:\anaconda\lib\site-packages\spacy\training\pretrain.py", line 16, in <module>
from ..schemas import ConfigSchemaPretrain
File "D:\anaconda\lib\site-packages\spacy\schemas.py", line 216, in <module>
class TokenPattern(BaseModel):
File "pydantic\main.py", line 299, in pydantic.main.ModelMetaclass.__new__
print("Loaded {:,} test examples.".format(len(test_treebank)))
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 "D:\anaconda\lib\typing.py", line 852, in __subclasscheck__
return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class
This issue says installing two packages chromadb and pydantic will work, so I installed them. I ran
However, the problem still exists. According to this issue, the problem ("TypeError: issubclass() arg 1 must be a class") should only exist for pydantic v1.10.7 and earlier related to the recent release of typing_extensions v4.6.0. My versions are higher, but this error isn't solved.
The text was updated successfully, but these errors were encountered:
Discussed in #13634
Originally posted by LuoXiaoxi-cxq September 26, 2024
I was running the training part of the [self-attentive-parser] (https://github.com/nikitakit/self-attentive-parser), where I met this error (probably caused by version problems of
spacy
andpydantic
):This issue says installing two packages
chromadb
andpydantic
will work, so I installed them. I ranI am running on Windows 11. Now, my environment is
However, the problem still exists. According to this issue, the problem ("TypeError: issubclass() arg 1 must be a class") should only exist for
pydantic
v1.10.7 and earlier related to the recent release oftyping_extensions
v4.6.0. My versions are higher, but this error isn't solved.The text was updated successfully, but these errors were encountered: