paperwork-shell -b import blah fails...
On Arch Linux using paperwork 1.2.4-5 I get this error when trying to import files from the command line:
Traceback (most recent call last):
File "/usr/bin/paperwork-shell", line 11, in <module>
load_entry_point('paperwork-backend==1.2.4', 'console_scripts', 'paperwork-shell')()
File "/usr/lib/python3.7/site-packages/paperwork_backend/shell_cmd.py", line 214, in main
sys.exit(COMMANDS[args.cmd](*args.cmd_args))
File "/usr/lib/python3.7/site-packages/paperwork_backend/shell.py", line 612, in cmd_import
return _do_import(args, dsearch, doc, ocr, ocr_lang, guess_labels)
File "/usr/lib/python3.7/site-packages/paperwork_backend/shell.py", line 486, in _do_import
"labels": [label.name for label in labels],
File "/usr/lib/python3.7/site-packages/paperwork_backend/shell.py", line 486, in <listcomp>
"labels": [label.name for label in labels],
AttributeError: 'tuple' object has no attribute 'name'
Traceback (most recent call last):
File "/home/jst/bin/paperwork-add", line 9, in <module>
f]).decode('utf-8')
File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['paperwork-shell', '-b', 'import', 'scans/statement.pdf']' returned non-zero exit status 1.
(On a side note, this very command has broken a number of times in the past, maybe there's some tests that could be added to help prevent more of that?)