1

Receive "AttributeError: 'NoneType' object has no attribute 'full'" when attempt to load en_core_web_trf.

Full error below. I can successfully load en_core_web_sm, and have run, running spacy 3.4.2.

    !python -m spacy download en_core_web_trf 
    nlp=spacy.load('en_core_web_trf')

error:

     30 def load(
     31     name: Union[str, Path],
     32     *,
   (...)
     37     config: Union[Dict[str, Any], Config] = util.SimpleFrozenDict(),
     38 ) -> Language:
     39     """Load a spaCy model from an installed package or a local path.
     40 
     41     name (str): Package name or model path.
   (...)
     52     RETURNS (Language): The loaded nlp object.
     53     """
---> 54     return util.load_model(
     55         name,
     56         vocab=vocab,
     57         disable=disable,
     58         enable=enable,
     59         exclude=exclude,
     60         config=config,
...
---> 54 self._growth_tracker = torch.full((1,), 0, dtype=torch.int)
     55 self._scale = torch.full((1,), init_scale)
     56 self._found_inf = False

followed this question but doesnt seem to work

BD98
  • 33
  • 3
  • 1
    Which OS are you using? Are you using your GPU or CPU alone? Are you using a virtual environment? Did you use `pip` or `conda`? Before installing `en_core_web_trf`, you should have installed `spacy` with something like `pip install spacy[transformers]==3.4.2`, was that the case? – David Espinosa Nov 23 '22 at 17:09
  • 1
    Thanks @DavidEspinosa. In the end i dont know the cause, i uninstalled and reinstalled and all working – BD98 Nov 24 '22 at 14:26
  • Glad to know that _"the good ol' reboot"_ saved the day for you @BD98 ;) – David Espinosa Nov 24 '22 at 20:21

0 Answers0