Invalid argument error on db-out

I get the following output when I try to output some of my annotations:

(env) [hadsed@hadsed-mbp-2 prodigy]$ pgy db-out goofy raw_datasets/
Traceback (most recent call last):
  File "/Users/hadsed/.pyenv/versions/3.5.6/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/hadsed/.pyenv/versions/3.5.6/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/hadsed/projects/real-engine/dbb/prodigy/env/lib/python3.5/site-packages/prodigy/__main__.py", line 246, in <module>
    plac.call(commands[command], arglist=args, eager=False)
  File "/Users/hadsed/projects/real-engine/dbb/prodigy/env/lib/python3.5/site-packages/plac_core.py", line 328, in call
    cmd, result = parser.consume(arglist)
  File "/Users/hadsed/projects/real-engine/dbb/prodigy/env/lib/python3.5/site-packages/plac_core.py", line 207, in consume
    return cmd, self.func(*(args + varargs + extraopts), **kwargs)
  File "/Users/hadsed/projects/real-engine/dbb/prodigy/env/lib/python3.5/site-packages/prodigy/__main__.py", line 217, in db_out
    write_jsonl(out_file, examples)
  File "cython_src/prodigy/util.pyx", line 410, in prodigy.util.write_jsonl
OSError: [Errno 22] Invalid argument

This doesn’t happen with the other annotations.

However, the command does work correctly on the machine that originally hosted the prodigy.db sqlite file. I copied it over to my personal machine and I get the above error. Perhaps the db was corrupted somehow?

It seems like the error occurs when the data is written to disk, so I don’t think there’s a problem with the database. (Just to be sure, you can always download the SQLite browser and have a look.)

Does the following alternative syntax work?

pgy db-out goofy > goofy.jsonl

Also, can you double-check that the directory path definitely exists and is writable?