EOFError: Ran out of input
For a while now, paperwork keeps crashing on start with an EOFError:
$ paperwork-shell rescan
Work directory: file:///home/user/Seafile/Scanner/tmp
Exception while calling 'add_doc'
Traceback (most recent call last):
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/index.py", line 95, in run
ret = func(*command.args, **command.kwargs)
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/index.py", line 404, in add_doc
self._update_doc_in_index(self.index_writer, doc)
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/index.py", line 360, in _update_doc_in_index
self.create_label(label)
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/index.py", line 629, in create_label
self.label_guesser.load(label.name)
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/labels.py", line 249, in load
self._bayes[label_name].cache_train()
File "/home/user/.local/lib/python3.5/site-packages/simplebayes/__init__.py", line 298, in cache_train
categories = pickle.load(open(filename, 'rb'))
EOFError: Ran out of input
{
"args": "('Ran out of input',)",
"exception": "<class 'EOFError'>",
"reason": "Ran out of input",
"status": "error"
}
Traceback (most recent call last):
File "/home/user/.local/bin/paperwork-shell", line 11, in <module>
sys.exit(main())
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/shell_cmd.py", line 214, in main
sys.exit(COMMANDS[args.cmd](*args.cmd_args))
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/shell.py", line 896, in cmd_rescan
rm.rescan()
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/shell.py", line 866, in rescan
self._on_progress
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/docsearch.py", line 173, in examine_rootdir
on_new_doc(doc)
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/shell.py", line 821, in _on_new_doc
self.index_updater.add_doc(doc)
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/docsearch.py", line 205, in add_doc
label_guesser_update=label_guesser_update)
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/index.py", line 780, in __call__
return self.client.remote_call(self.method_name, *args, **kwargs)
File "/home/user/.local/lib/python3.5/site-packages/paperwork_backend/index.py", line 795, in remote_call
raise ret.exc
EOFError: Ran out of input
I've made a script to sort out all documents from the paper directory that cause this error (by copying them into an empty workdir one by one and running a rescan, if it crashes, the doc is 'faulty'). Now I have 248 doc folders (out of 1398 total) that will crash paperwork, even though they have been imported and handled successfully before. I cannot figure out what causes the error, what's going wrong here?
I've deleted all my users python3 packages and reinstalled paperwork via pip3, but no luck. I'm running Debian 9.