cernopendata/opendata.cern.ch

`invenio --help` leading to KeyError 'invenio-records-rest'

tiborsimko opened this issue · 0 comments

Seen locally and on QA:

$ docker exec -i -t opendatacernch-web-1 /bin/bash -c 'invenio --help'
...
Commands:
  alembic   Perform database migrations.
  collect   Collect static files.
  db        Database commands.
  files     File management commands.
  index     Manage search indices.
  instance  Instance commands.
  pid       PID-Store management commands.
  roles     Role commands.
  routes    Show the routes for the app.
  run       Run a development server.
  shell     Runs a shell in the app context.
  users     User commands.
  webpack   Webpack commands.
/usr/lib64/python3.9/site-packages/XRootD/client/finalize.py:46: DeprecationWarning: Importing 'itsdangerous.json' is deprecated and will be removed in ItsDangerous 2.1. Use Python's 'json' module instead.
  if isinstance(obj, File) and obj.is_open():

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib64/python3.9/site-packages/XRootD/client/finalize.py", line 46, in finalize
    if isinstance(obj, File) and obj.is_open():
  File "/opt/invenio/var/instance/python/lib/python3.9/site-packages/werkzeug/local.py", line 316, in __get__
    obj = instance._get_current_object()
  File "/opt/invenio/var/instance/python/lib/python3.9/site-packages/werkzeug/local.py", line 520, in _get_current_object
    return get_name(local())  # type: ignore
  File "/opt/invenio/var/instance/python/lib/python3.9/site-packages/invenio_records_rest/proxies.py", line 15, in <lambda>
    lambda: current_app.extensions["invenio-records-rest"]
KeyError: 'invenio-records-rest'