prodigy ner.manual: error: the following arguments are required: source

Hi I am very confused for first time using prodigy,I didnt understand how add my data.json file to read by prodigy and run it in local host. I have a file and the location is in C:\Users\W I N D O W S\.prodigy\data.json but when I using cmd and write
python -m prodigy ner.manual data ./data.json --label PERSON,ORG,LOC I got an error of

Using 3 label(s): PERSON, ORG, LOC
usage: prodigy ner.manual [-h] [-lo None] [-l None] [-pt None] [-e None] [-C] dataset spacy_model source
prodigy ner.manual: error: the following arguments are required: source

I already give the file location why it asking source? If I run python -m prodigy stats it will return

Version          1.11.7
Location         D:\Pyton 3.8\lib\site-packages\prodigy
Prodigy Home     C:\Users\W I N D O W S\.prodigy
Platform         Windows-10-10.0.19041-SP0
Python Version   3.8.10
Database Name    SQLite
Database Id      sqlite
Total Datasets   2
Total Sessions   5

In the doc I didnt understand about "the dataset name",is that my json file or the sqlite db server?How to add my json so I can annotate?

I try to add and load a json file in my C:\Users\W I N D O W S\.prodigy\data.json but Always throw and error when I try cmd

C:\Users\W I N D O W S>python -m prodigy textcat.manual sentiment ./data.json --loader json --label POS,NEG,NET

but it cannot starting the prodigy and throw

Using 3 label(s): POS, NEG, NET

✘ Can't find file ./data.json
data.json

How to load data json in prodigy?I am confusing about database sqlite?does we need to upload it first?How to use prodigy?

Noted when I try python -m prodigy stats it give me a result

Version          1.11.7
Location         D:\Pyton 3.8\lib\site-packages\prodigy
Prodigy Home     C:\Users\W I N D O W S\.prodigy
Platform         Windows-10-10.0.19041-SP0
Python Version   3.8.10
Database Name    SQLite
Database Id      sqlite
Total Datasets   6
Total Sessions   14

Hi! I've merged your posts into one thread since they both seem to deal with similar questions :slightly_smiling_face:

It looks like you're just missing the model argument here. If you look at the documentation here, you can see the expected arguments, in order: Built-in Recipes · Prodigy · An annotation tool for AI, Machine Learning & NLP

The first argument is the name of the dataset to save the annotations to, in your case data. The second argument is the name or path to a spaCy model or blank:en to use a blank English tokenizer. And the third argument is the path to the file. So your command could look like this:

python -m prodigy ner.manual data blank:en "C:\Users\W I N D O W S\.prodigy\data.json" --label PERSON,ORG,LOC

This error indicates that the file can't be found or loaded from that path. The path you provided points at a data.json in the current working directory, so maybe double-check that you're in the correct directory? Alternatively, you can also provide an absoluie path like I've shown in the command above.

in the doc of text classification we didnt need to add model argument so based on your answer I update as

C:\Users\W I N D O W S>python -m prodigy textcat.manual data "C:\Users\W I N D O W S\.prodigy\data.json" --label PERSON,ORG,LOC

but even I try to remove the --loader json it still give me an error. This super confusing

Using 3 label(s): PERSON, ORG, LOC
Traceback (most recent call last):
  File "D:\Pyton 3.8\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "D:\Pyton 3.8\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\Pyton 3.8\lib\site-packages\prodigy\__main__.py", line 61, in <module>
    controller = recipe(*args, use_plac=True)
  File "cython_src\prodigy\core.pyx", line 339, in prodigy.core.recipe.recipe_decorator.recipe_proxy
  File "cython_src\prodigy\core.pyx", line 366, in prodigy.core._components_to_ctrl
  File "cython_src\prodigy\core.pyx", line 125, in prodigy.core.Controller.__init__
  File "cython_src\prodigy\components\feeds.pyx", line 104, in prodigy.components.feeds.Feed.__init__
  File "cython_src\prodigy\components\feeds.pyx", line 150, in prodigy.components.feeds.Feed._init_stream
  File "cython_src\prodigy\components\stream.pyx", line 107, in prodigy.components.stream.Stream.__init__
  File "cython_src\prodigy\components\stream.pyx", line 58, in prodigy.components.stream.validate_stream
  File "cython_src\prodigy\components\preprocess.pyx", line 347, in add_label_options
  File "cython_src\prodigy\components\loaders.pyx", line 29, in _add_attrs
  File "cython_src\prodigy\components\filters.pyx", line 46, in filter_duplicates
  File "cython_src\prodigy\components\filters.pyx", line 18, in filter_empty
  File "cython_src\prodigy\components\loaders.pyx", line 23, in _rehash_stream
  File "cython_src\prodigy\components\loaders.pyx", line 171, in JSON
  File "D:\Pyton 3.8\lib\site-packages\srsly\_json_api.py", line 39, in json_loads
    return ujson.loads(data)
ValueError: Expected object or value

Yes, in textcat.manual you don't need a model argument (because it doesn't rely on tokenization).

Based on the error, it looks like the JSON can't be loaded so maybe try and double-check it with a JSON validator to make sure it's valid?

Yes its a valid json based on online validator and it came from pandas to

Hi it already solved. I try a few antoher orient in json pandas. It works on orient of records. I Think prodigy only read in json orient of records