TypeError: Plain typing.NoReturn is not valid as type argument
BEILOP opened this issue · 2 comments
BEILOP commented
import spacy
File "C:\Users\Administrator\Anaconda3\lib\site-packages\spacy\__init__.py", line 14, in <module>
from . import pipeline # noqa: F401
File "C:\Users\Administrator\Anaconda3\lib\site-packages\spacy\pipeline\__init__.py", line 1, in <module>
from .attributeruler import AttributeRuler
File "C:\Users\Administrator\Anaconda3\lib\site-packages\spacy\pipeline\attributeruler.py", line 6, in <module>
from .pipe import Pipe
File "spacy\pipeline\pipe.pyx", line 1, in init spacy.pipeline.pipe
File "spacy\strings.pyx", line 15, in init spacy.strings
File "C:\Users\Administrator\Anaconda3\lib\site-packages\spacy\util.py", line 1594, in <module>
default_error_handler: Callable[[str, "Pipe", List["Doc"], Exception], NoReturn],
File "C:\Users\Administrator\Anaconda3\lib\typing.py", line 755, in __getitem__
return self.__getitem_inner__(params)
File "C:\Users\Administrator\Anaconda3\lib\typing.py", line 251, in inner
return func(*args, **kwds)
File "C:\Users\Administrator\Anaconda3\lib\typing.py", line 774, in __getitem_inner__
result = _type_check(result, msg)
File "C:\Users\Administrator\Anaconda3\lib\typing.py", line 135, in _type_check
raise TypeError(f"Plain {arg} is not valid as type argument")
TypeError: Plain typing.NoReturn is not valid as type argument```
ygorg commented
Hi,
This seem to be a Spacy issue.
This error is discussed at spacy#9600.
People are suggesting that it is a bug in python and the fix is to upgrade python to a newer version (3.7.2 is mentioned).