# Error while \`prodigy stats -l\`

**URL:** <https://support.prodi.gy/t/error-while-prodigy-stats-l/1198>\
**Category:** Uncategorized\
**Tags:** usage, install, solved\
**Created:** [February 7, 2019, 12:11am UTC](https://support.prodi.gy/t/error-while-prodigy-stats-l/1198 "2019-02-07T00:11:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arul](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Arul](https://support.prodi.gy/u/Arul)\
**Post date:** [February 7, 2019, 12:11am UTC](https://support.prodi.gy/t/error-while-prodigy-stats-l/1198/1 "2019-02-07T00:11:57Z")

</div>

I am getting this error when i did ‘prodigy stats -l’

```
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__ (pkg_name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prodigy/ __init__.py", line 9, in <module>
from . import recipes # noqa
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prodigy/recipes/ __init__.py", line 4, in <module>
from . import dep, ner, textcat, pos, compare, terms, generic, image # noqa
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prodigy/recipes/ner.py", line 16, in <module>
from ..models.ner import EntityRecognizer, merge_spans, guess_batch_size
File "cython_src/prodigy/models/ner.pyx", line 13, in init prodigy.models.ner
ImportError: cannot import name _cleanup

```

I thought i screwed up something and re-installed prodigy. when i do the same command, i get this error:

```
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__ (pkg_name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prodigy/ __init__.py", line 9, in <module>
from . import recipes # noqa
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prodigy/recipes/ __init__.py", line 4, in <module>
from . import dep, ner, textcat, pos, compare, terms, generic, image # noqa
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/prodigy/recipes/dep.py", line 5, in <module>
import spacy
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/spacy/ __init__.py", line 11, in <module>
from .cli.info import info as cli_info
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/spacy/cli/ __init__.py", line 6, in <module>
from .train import train # noqa: F401
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/spacy/cli/train.py", line 16, in <module>
from .._ml import create_default_optimizer
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/spacy/_ml.py", line 11, in <module>
from thinc.misc import FeatureExtracter
ImportError: cannot import name 'FeatureExtracter'
```

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [February 7, 2019, 12:16am UTC](https://support.prodi.gy/t/error-while-prodigy-stats-l/1198/2 "2019-02-07T00:16:30Z")

</div>

This looks like some weirdness with your environment and installed dependencies. Did you previously install / uninstall spaCy in the same environment? Does anything else work for you, like, running other Prodigy commands, importing spaCy etc?

If not, try installing everything in a fresh virtual environment from scratch.

---

<div class="post-metadata">

**Author:** ![Arul](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Arul](https://support.prodi.gy/u/Arul)\
**Post date:** [February 7, 2019, 12:20am UTC](https://support.prodi.gy/t/error-while-prodigy-stats-l/1198/3 "2019-02-07T00:20:43Z")

</div>

I haven’t done installing for long… i got import error in spacy too. other prodigy commands do not work.

---

<div class="post-metadata">

**Author:** ![Arul](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@Arul](https://support.prodi.gy/u/Arul)\
**Post date:** [February 7, 2019, 12:46am UTC](https://support.prodi.gy/t/error-while-prodigy-stats-l/1198/4 "2019-02-07T00:46:44Z")

</div>

Found it!! I had installed spacy-stanfordnlp recently that screws up the env. uninstalling that and then reinstalling spacy and prodigy works.

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [February 7, 2019, 12:51am UTC](https://support.prodi.gy/t/error-while-prodigy-stats-l/1198/5 "2019-02-07T00:51:14Z")

</div>

Ahh, this makes sense. `spacy-stanfordnlp` depends on `spacy-nightly`, which pulled in all of its new dependencies (that aren’t compatible with the latest stable version). So you’ve ended up with dependency mismatches in your environment.

(So always use a fresh virtual environment 😜)

---

<div class="post-metadata">

**Author:** ![schmmd](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/schmmd/32/639_2.png) [@schmmd](https://support.prodi.gy/u/schmmd)\
**Post date:** [February 7, 2019, 11:59pm UTC](https://support.prodi.gy/t/error-while-prodigy-stats-l/1198/6 "2019-02-07T23:59:28Z")

</div>

I got this same error when building [https://github.com/allenai/allennlp-demo](https://github.com/allenai/allennlp-demo) in a fresh Conda environment (it depends on [https://github.com/allenai/allennlp/releases/tag/v0.8.0](https://github.com/allenai/allennlp/releases/tag/v0.8.0)). It looks like we also depended on nightly–hopefully this is fixed in v0.8.1.

---

<div class="post-metadata">

**Author:** ![schmmd](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/schmmd/32/639_2.png) [@schmmd](https://support.prodi.gy/u/schmmd)\
**Post date:** [February 8, 2019, 12:15am UTC](https://support.prodi.gy/t/error-while-prodigy-stats-l/1198/7 "2019-02-08T00:15:12Z")

</div>

This was probably only affecting me–for some reason fresh conda environments contained scispacy which brought in nightly.
