db-out for annotated images fails

database

(Sooheon Kim) #1

I know this feature was alpha, does it not support accessing the annotations yet?

Traceback (most recent call last):
  File "/Users/sooheon/.pyenv/versions/3.6.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/sooheon/.pyenv/versions/3.6.6/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/sooheon/.local/share/virtualenvs/barcode_decoder-ZzuM-6jH/lib/python3.6/site-packages/prodigy/__main__.py", line 251, in <module>
    plac.call(commands[command], arglist=args, eager=False)
  File "/Users/sooheon/.local/share/virtualenvs/barcode_decoder-ZzuM-6jH/lib/python3.6/site-packages/plac_core.py", line 328, in call
    cmd, result = parser.consume(arglist)
  File "/Users/sooheon/.local/share/virtualenvs/barcode_decoder-ZzuM-6jH/lib/python3.6/site-packages/plac_core.py", line 207, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "/Users/sooheon/.local/share/virtualenvs/barcode_decoder-ZzuM-6jH/lib/python3.6/site-packages/prodigy/__main__.py", line 222, in db_out
    write_jsonl(out_file, examples)
  File "cython_src/prodigy/util.pyx", line 403, in prodigy.util.write_jsonl
OSError: [Errno 22] Invalid argument

(Ines Montani) #2

Could you share the full command you ran? I don’t think it’s related to the recipe or how the data was created – the error only occurs in the function that takes the examples pulled from the DB and writes them out to a JSONL file.

Can you double-check that the directory path definitely exists and is writable? And does this syntax work for you?

prodigy db-out your_dataset_name > some_file.jsonl