Getting KeyError '' when launching prodigy

I started playing around with prodigy, following the installation guide.

But on launch I get this error:

> prodigy
Traceback (most recent call last):
  File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 144, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/Users/leifg/projects/side_projects/leifslist/machine_learning/lib/python3.8/site-packages/prodigy/__init__.py", line 7, in <module>
    from . import recipes
  File "/Users/leifg/projects/side_projects/leifslist/machine_learning/lib/python3.8/site-packages/prodigy/recipes/__init__.py", line 4, in <module>
    from ..deprecated import recipes  # noqa
  File "/Users/leifg/projects/side_projects/leifslist/machine_learning/lib/python3.8/site-packages/prodigy/deprecated/recipes.py", line 10, in <module>
    from ..components.loaders import get_stream
  File "cython_src/prodigy/components/loaders.pyx", line 10, in init prodigy.components.loaders
  File "/Users/leifg/projects/side_projects/leifslist/machine_learning/lib/python3.8/site-packages/prodigy/app.py", line 41, in <module>
    del _uvicorn_log_config["loggers"][""]
KeyError: ''

I'm using an virtualenv with pyton 3.8.4 on macOS with prodigy 1.10.1.

I tried running the first example in the docs

prodigy ner.manual nr_news_headlines blank:en ./news_headlines.jsonl --label PERSON,ORG,PRODUCT,LOCATION` 

which yields the same result.

Hi! It seems like a new version of uvicorn (the library that Prodigy uses for to serve the app) introduced a backwards-incompatible change. We'll release a new Prodigy version with the required change soon, but in the meantime, downgrading uvicorn should fix it:

3 Likes

Thank you!

That helped.

1 Like

Just released v1.10.2 of Prodigy, which upgrades to the latest uvicorn!