`resources.py --details` does not work if database interface is not installed
When running resources.py --types d --details
, the script fails with the following exception:
List of registered databases:
Traceback (most recent call last):
File "envs/bob-9/bin/resources.py", line 33, in <module>
sys.exit(load_entry_point('bob.bio.base==5.0.0', 'console_scripts', 'resources.py')())
File "envs/bob-9/lib/python3.8/site-packages/bob/bio/base/script/resources.py", line 32, in resources
print (bob.bio.base.list_resources('database', **kwargs))
File "/envs/bob-9/lib/python3.8/site-packages/bob/bio/base/utils/resources.py", line 315, in list_resources
retval += " ==> " + str(entry_point.load()) + "\n\n"
File "envs/bob-9/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2450, in load
return self.resolve()
File "envs/bob-9/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2456, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "envs/bob-9/lib/python3.8/site-packages/bob/bio/face/config/database/arface.py", line 10, in <module>
ARFaceBioDatabase(
File "envs/bob-9/lib/python3.8/site-packages/bob/bio/face/database/arface.py", line 36, in __init__
from bob.db.arface.query import Database as LowLevelDatabase
ModuleNotFoundError: No module named 'bob.db.arface'
Unfortunately, I cannot (easily) install the databases in python 3.8, see https://stackoverflow.com/questions/68003751/why-are-the-bob-databases-e-g-bob-db-arface-not-available-for-python-3-8
I think, there should a a try/except
wrapper around loading the resources in detail mode, and only list those for which the databases are actually installed.