diff --git a/requirements/python-extras-spacy b/requirements/python-extras-spacy index dc4d715b..2296db4e 100644 --- a/requirements/python-extras-spacy +++ b/requirements/python-extras-spacy @@ -2,7 +2,12 @@ # Extra dependancies for spacy detector # wheel is needed for spacy to do its funky model management, not sure why its not a dep of spacy directly wheel -thinc==8.0.0rc2; python_version>='3.6' or python_version<'3.9' -spacy-nightly[transformers]==3.0.0rc2; python_version>='3.6' or python_version<'3.9' + +thinc>=8.0.0rc3,<8.1.0; python_version>='3.6' or python_version<'3.9' +spacy-nightly[transformers]==3.0.0rc3; python_version>='3.6' or python_version<'3.9' + +# thinc==8.0.0rc2; python_version>='3.6' or python_version<'3.9' +# spacy-nightly[transformers]==3.0.0rc2; python_version>='3.6' or python_version<'3.9' + # spacy-nightly[transformers]>=3.0.0rc1; python_version >= '3.6' # spacy-transformers>=1.0.0rc0 diff --git a/scrubadub/detectors/spacy.py b/scrubadub/detectors/spacy.py index 49dd815c..8ddce454 100644 --- a/scrubadub/detectors/spacy.py +++ b/scrubadub/detectors/spacy.py @@ -139,7 +139,12 @@ def check_spacy_version() -> bool: @staticmethod def check_spacy_model(model) -> bool: """Ensure that the spaCy model is installed.""" - spacy_info = spacy.info() + try: + spacy_info = spacy.info() + except TypeError: + # There is a forgotten default argument in spacy.info in version 3rc3, this try except should be removed + # in the future. + spacy_info = spacy.info(exclude=[]) models = list(spacy_info.get('pipelines', spacy_info.get('models', None)).keys()) if models is None: raise ValueError('Unable to detect spacy models.')