# Error when running Prodigy 1.9.1 ner.manual with --patterns argument

**URL:** <https://support.prodi.gy/t/error-when-running-prodigy-1-9-1-ner-manual-with-patterns-argument/2347>\
**Category:** Uncategorized\
**Tags:** ner, done\
**Created:** [December 20, 2019, 9:11pm UTC](https://support.prodi.gy/t/error-when-running-prodigy-1-9-1-ner-manual-with-patterns-argument/2347 "2019-12-20T21:11:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronaldcturner](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@ronaldcturner](https://support.prodi.gy/u/ronaldcturner)\
**Post date:** [December 20, 2019, 9:11pm UTC](https://support.prodi.gy/t/error-when-running-prodigy-1-9-1-ner-manual-with-patterns-argument/2347/1 "2019-12-20T21:11:21Z")

</div>

Script: **prodigy ner.manual SENSITIVE en\_core\_web\_lg notes.jsonl --label Drug --patterns .\tmp\patterns\_drugs-DRUG.jsonl**

Server crashes.

Top of error log: **Task exception was never retrieved**  
\*_future: \<Task finished coro=\<RequestResponseCycle.run\_asgi() done, defined at C:\Users\RonT\AppData\*_  
**Local\Programs\Python\Python37\lib\site-packages\uvicorn\protocols\http\h11\_impl.py:383\> exception=K**  
**eyError('meta')\>**

Last lines of error log: **File "C:\Users\RonT\AppData\Local\Programs\Python\Python37\lib\site-packages\prodigy\recipes\ner.p**  
**y", line 154, in**   
\*\* stream = (eg for \_, eg in pattern\_matcher(stream))\*\*  
\*\* File "cython\_src\prodigy\models\matcher.pyx", line 200, in **call** \*\*  
**KeyError: 'meta'**

Patterns file is from [prodigy-recipes](https://github.com/explosion/prodigy-recipes)/[example-patterns](https://github.com/explosion/prodigy-recipes/tree/master/example-patterns)/ **patterns\_drugs-DRUG.jsonl**

Server launches properly WITHOUT the --patterns argument.

Happy to supply more data as you request. Hope you find it to be my cockpit error.

Thank you.

---

<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:** [December 20, 2019, 9:22pm UTC](https://support.prodi.gy/t/error-when-running-prodigy-1-9-1-ner-manual-with-patterns-argument/2347/2 "2019-12-20T21:22:29Z")

</div>

Thanks for the report – and sorry about that! The pattern matcher writes the matched pattern info to the task's `"meta"` so it's displayed in the bottom right corner of the annotation part. And it didn't correctly make sure the dict is created if it doesn't exist. I've already fixed this internally and we'll push another patch release with the fix.

In the meantime, the easiest workaround would be to add `"meta": {}` to each example:

```python
import srsly
examples = srsly.read_jsonl("./notes.jsonl")
for eg in examples:
    eg["meta"] = {}
srsly.write_jsonl("./notes_updated.jsonl")

```

**Edit:** Just released v1.9.2, which fixes the underlying problem 🙂

---

<div class="post-metadata">

**Author:** ![ronaldcturner](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@ronaldcturner](https://support.prodi.gy/u/ronaldcturner)\
**Post date:** [December 21, 2019, 1:44am UTC](https://support.prodi.gy/t/error-when-running-prodigy-1-9-1-ner-manual-with-patterns-argument/2347/3 "2019-12-21T01:44:09Z")

</div>

Thank you kindly, Ines! 1.92 Installed in a few seconds. **new.manual . . . --patterns** now works per the new docs.
