Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcoded path /srv/ocrd_all? #7

Open
mikegerber opened this issue Jun 7, 2021 · 1 comment
Open

Hardcoded path /srv/ocrd_all? #7

mikegerber opened this issue Jun 7, 2021 · 1 comment

Comments

@mikegerber
Copy link

$ TESSDATA_PREFIX=/usr/share/tesseract-ocr/4.00/tessdata celery worker -A ocrd_butler.celery_worker.celery -E -l info
Traceback (most recent call last):
  File "/home/mike/ocrd_all/venv/bin/celery", line 8, in <module>
    sys.exit(main())
  File "/home/mike/ocrd_all/venv/lib/python3.7/site-packages/celery/__main__.py", line 16, in main
    _main()
  File "/home/mike/ocrd_all/venv/lib/python3.7/site-packages/celery/bin/celery.py", line 322, in main
    cmd.execute_from_commandline(argv)
  File "/home/mike/ocrd_all/venv/lib/python3.7/site-packages/celery/bin/celery.py", line 496, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
  File "/home/mike/ocrd_all/venv/lib/python3.7/site-packages/celery/bin/base.py", line 288, in execute_from_commandline
    argv = self.setup_app_from_commandline(argv)
  File "/home/mike/ocrd_all/venv/lib/python3.7/site-packages/celery/bin/base.py", line 502, in setup_app_from_commandline
    self.app = self.find_app(app)
  File "/home/mike/ocrd_all/venv/lib/python3.7/site-packages/celery/bin/base.py", line 524, in find_app
    return find_app(app, symbol_by_name=self.symbol_by_name)
  File "/home/mike/ocrd_all/venv/lib/python3.7/site-packages/celery/app/utils.py", line 368, in find_app
    sym = symbol_by_name(app, imp=imp)
  File "/home/mike/ocrd_all/venv/lib/python3.7/site-packages/celery/bin/base.py", line 527, in symbol_by_name
    return imports.symbol_by_name(name, imp=imp)
  File "/home/mike/ocrd_all/venv/lib/python3.7/site-packages/kombu/utils/imports.py", line 57, in symbol_by_name
    module = imp(module_name, package=package, **kwargs)
  File "/home/mike/ocrd_all/venv/lib/python3.7/site-packages/celery/utils/imports.py", line 111, in import_from_cwd
    return imp(module, package=package)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/mike/ocrd_butler/ocrd_butler/celery_worker.py", line 6, in <module>
    from ocrd_butler.app import flask_app
  File "/home/mike/ocrd_butler/ocrd_butler/app.py", line 8, in <module>
    from ocrd_butler import (
  File "/home/mike/ocrd_butler/ocrd_butler/factory.py", line 11, in <module>
    from ocrd_butler.api.chains import chain_namespace
  File "/home/mike/ocrd_butler/ocrd_butler/api/chains.py", line 21, in <module>
    from ocrd_butler.api.processors import (
  File "/home/mike/ocrd_butler/ocrd_butler/api/processors.py", line 32, in <module>
    "Can't find ocrd-tools.json {0}, giving up.".format(ocrd_tool_file))
ImportError: Can't find ocrd-tools.json /srv/ocrd_all/ocrd_olena/ocrd-tool.json, giving up.

I had put ocrd_all to /home/mike/ocrd_all for testing, but from the looks of it, ocrd_butler seems to look for /srv/ocrd_all.

@mikegerber
Copy link
Author

The path seems to be configured in ocrd_butler/config.py. For now I'll move ocrd_all to /srv/ocrd_all. I believe the README should address this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant