cannot find model
Closed this issue · 1 comments
bertsky commented
To me, 1eb4cb1 (Improve searching for model files) is a regression: The old method delegated to ocrolib.load_object()
, which itself would try various paths (the system's datarootdir
, /usr/local/share/ocropus
, the CWD, the directory of the source file) and its subdirectories, and would also try with and without .gz
suffix. It thus covered many use cases (in venvs, in system, in docker containers).
But the new method with an additional get_model()
raises an exception before even allowing load_object()
to do its work.
bertsky commented
BTW, load_object()
calls ocropus_find_file()
which already raises an exception, if none of the various attempts are fruitful eventually. So it is safe to just remove the new exception.