# prodigy ner train error iob translated to json annotation data

**URL:** <https://support.prodi.gy/t/prodigy-ner-train-error-iob-translated-to-json-annotation-data/5444>\
**Category:** Uncategorized\
**Tags:** usage, ner, training\
**Created:** [March 14, 2022, 11:38am UTC](https://support.prodi.gy/t/prodigy-ner-train-error-iob-translated-to-json-annotation-data/5444 "2022-03-14T11:38:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JulieSarah](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/juliesarah/32/3417_2.png) [@JulieSarah](https://support.prodi.gy/u/JulieSarah)\
**Post date:** [March 14, 2022, 11:38am UTC](https://support.prodi.gy/t/prodigy-ner-train-error-iob-translated-to-json-annotation-data/5444/1 "2022-03-14T11:38:34Z")

</div>

Hi all,  
I got the following error:

**✘ Invalid data for component 'ner'**  
**text field required**

By running:  
prodigy train ner $DATASET\_NAME "data\_path\_model" --output "/results"

The dataset I ingested into prodidy db is an iob , which I translated with spacy convert following command, to json;  
python -m spacy convert $DATA\_FILE $DATA\_OUTPUT\_PATH -t json -n 1 -c iob

The prodigy db-in command ran fine and the dataset was ingested on prodigy db.

The format of it is this way:

[  
{  
"id":0,  
"paragraphs":[  
{  
"sentences":[  
{  
"tokens":[  
{  
"orth":"bbb",  
"tag":"-",  
"ner":"O"  
},  
{  
"orth":"aaa",  
"tag":"-",  
"ner":"O"  
}, _continuation_  
Could you help me correct it please? 😁  
Thank you

---

<div class="post-metadata">

**Author:** ![ljvmiranda921](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ljvmiranda921/32/3197_2.png) [@ljvmiranda921](https://support.prodi.gy/u/ljvmiranda921)\
**Post date:** [March 16, 2022, 2:17am UTC](https://support.prodi.gy/t/prodigy-ner-train-error-iob-translated-to-json-annotation-data/5444/2 "2022-03-16T02:17:49Z")

</div>

Hi @JulieSarah ,

It seems that you're using spaCy v2's JSON format, not [Prodigy's JSON format](https://prodi.gy/docs/api-loaders#input), that's why it's looking for a `"text"` field. You can convert your dataset into that format and try again.

---

<div class="post-metadata">

**Author:** ![JulieSarah](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/juliesarah/32/3417_2.png) [@JulieSarah](https://support.prodi.gy/u/JulieSarah)\
**Post date:** [March 25, 2022, 4:56pm UTC](https://support.prodi.gy/t/prodigy-ner-train-error-iob-translated-to-json-annotation-data/5444/3 "2022-03-25T16:56:05Z")

</div>

Thank you but it does not solve the problem. Even with jsonl I have the same error as I don't have any text field!  
 ![Screenshot 2022-03-25 at 17.55.42](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/7/7fb6883c6549a94bef9d6450df119e057f7fbed8.png)

---

<div class="post-metadata">

**Author:** ![ljvmiranda921](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ljvmiranda921/32/3197_2.png) [@ljvmiranda921](https://support.prodi.gy/u/ljvmiranda921)\
**Post date:** [March 28, 2022, 2:25am UTC](https://support.prodi.gy/t/prodigy-ner-train-error-iob-translated-to-json-annotation-data/5444/4 "2022-03-28T02:25:52Z")

</div>

Hi @JulieSarah ,

You need to convert your data into Prodigy's JSONL format. You're passing the incorrect format into Prodigy that's why you see an error. Since you already have a spaCy file, you can convert it using this script: [Script: Load data in spaCy v3's .spacy format](https://support.prodi.gy/t/script-load-data-in-spacy-v3s-spacy-format/4369)

So again, what you can do is:

IOB -\> .spaCy file (save it into a serialized file [using the DocBin construct](https://spacy.io/api/docbin#to_disk)) -\> Prodigy JSONL file (using the script provided, which you can edit based on your needs)
