# Trailing data

**URL:** <https://support.prodi.gy/t/trailing-data/4433>\
**Category:** Uncategorized\
**Tags:** usage, solved\
**Created:** [July 13, 2021, 9:50am UTC](https://support.prodi.gy/t/trailing-data/4433 "2021-07-13T09:50:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnastKuz](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/anastkuz/32/2218_2.png) [@AnastKuz](https://support.prodi.gy/u/AnastKuz)\
**Post date:** [July 13, 2021, 9:50am UTC](https://support.prodi.gy/t/trailing-data/4433/1 "2021-07-13T09:50:51Z")

</div>

Hello!  
I created prodigy format as was said here:

> [@Re-labling custom dataset with Prodigy](https://support.prodi.gy/t/re-labling-custom-dataset-with-prodigy/4366):
>
> Hello! I was wondering if I can load my own dataset (text and labels - IOB scheme at the moment) in Prodigy and if labeled entities will be highlighted? Text was labeled with prediction by PyTorch model and I wanted to load it in Prodigy, to see labels already highlighted and to check if everything is correctly labeled and if not - correct it. Is it possible? At the moment I have two files - one with text (sentence per line), the other one only with labels of type: (O O O B-MTRL I-MTRL O O) p…

Then I saved it using both variants with new line and srsly like it was said here:

> [@ValueError: Trailing data](https://support.prodi.gy/t/valueerror-trailing-data/1778/4):
>
> Ahh okay – that explains a lot! JSONL is newline-delimited JSON, so one record needs to be on one line. (The advantage is that you can read it in line by line, but it also produces very long lines). It looks like you’ve creared a regular JSON file? So if you name it .json or set --loader json on the command line, it should be read in as JSON and work as expected. If you do want JSONL, you’d have to write '\n'.join([json.dumps(line) for line in your\_data]) to your file. Or you can use the help…

But still I have error:

```python
python -m prodigy ner.manual output_db de_core_news_sm danil_test.jsonl --loader json -l PRODNAME,MTRL,ENNUM,TEMPER
Using 4 label(s): PRODNAME, MTRL, ENNUM, TEMPER
Traceback (most recent call last):
  File "..\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "..\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "..\python files\repositories\d2b_prodigy\venv\lib\site-packages\prodigy\ __main__.py", line 53, in <module>
    controller = recipe(*args, use_plac=True)
  File "cython_src\prodigy\core.pyx", line 331, in prodigy.core.recipe.recipe_decorator.recipe_proxy
  File "cython_src\prodigy\core.pyx", line 353, in prodigy.core._components_to_ctrl
  File "cython_src\prodigy\core.pyx", line 142, in prodigy.core.Controller. __init__
  File "cython_src\prodigy\components\feeds.pyx", line 56, in prodigy.components.feeds.SharedFeed. __init__
  File "cython_src\prodigy\components\feeds.pyx", line 155, in prodigy.components.feeds.SharedFeed.validate_stream
  File "..\python files\repositories\d2b_prodigy\venv\lib\site-packages\toolz\itertoolz.py", line 376, in first
    return next(iter(seq))
  File "cython_src\prodigy\components\preprocess.pyx", line 128, in add_tokens
  File "cython_src\prodigy\components\filters.pyx", line 37, in filter_duplicates
  File "cython_src\prodigy\components\filters.pyx", line 13, in filter_empty
  File "cython_src\prodigy\components\loaders.pyx", line 24, in _rehash_stream
  File "cython_src\prodigy\components\loaders.pyx", line 157, in JSON
  File "..\python files\repositories\d2b_prodigy\venv\lib\site-packages\srsly\_json_api.py", line 38, in json_loads
    return ujson.loads(data)
ValueError: Trailing data

```

Both files i got look like this:

 ![json](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/9/9b5c09a54f8a19979e0d7462d134322e46f28068.png)

What can I do to get proper jsonl format for prodigy to read it?

---

<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:** [July 14, 2021, 1:34am UTC](https://support.prodi.gy/t/trailing-data/4433/2 "2021-07-14T01:34:56Z")

</div>

Hi! I think the problem here is that when you run the command, you've set `--loader json`, even though your file is a JSONL file. So under the hood, Prodigy will try to load it as JSON, and that will fail because the data is newline-delimited JSON.

You should be able to just remove the loader and Prodigy will guess it correctly from the file extension.

---

<div class="post-metadata">

**Author:** ![AnastKuz](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/anastkuz/32/2218_2.png) [@AnastKuz](https://support.prodi.gy/u/AnastKuz)\
**Post date:** [July 14, 2021, 9:34am UTC](https://support.prodi.gy/t/trailing-data/4433/3 "2021-07-14T09:34:04Z")

</div>

Thank you, that helped!
