PBR

Comment 2 for bug 1972975

Revision history for this message
Jochman (jochman) wrote :

In the latest releases you've added the check for if importlib_metadata is installed.

Error I got:

Traceback (most recent call last):
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/_cache.py", line 159, in _get_data_for_path
    with open(filename, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/root/.cache/python-entrypoints/91d14e59ff7d623967ce1b6a6e589176c3086b83b4325bd9e872bf8067e0d14c'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/local/lib/python3.10/runpy.py", line 146, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/local/lib/python3.10/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/bandit/__init__.py", line 7, in <module>
    from bandit.core import config # noqa
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/bandit/core/__init__.py", line 5, in <module>
    from bandit.core import config # noqa
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/bandit/core/config.py", line 15, in <module>
    from bandit.core import extension_loader
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/bandit/core/extension_loader.py", line 109, in <module>
    MANAGER = Manager()
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/bandit/core/extension_loader.py", line 21, in __init__
    self.load_formatters(formatters_namespace)
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/bandit/core/extension_loader.py", line 26, in load_formatters
    self.formatters_mgr = extension.ExtensionManager(
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/extension.py", line 133, in __init__
    extensions = self._load_plugins(invoke_on_load,
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/extension.py", line 218, in _load_plugins
    for ep in self.list_entry_points():
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/extension.py", line 207, in list_entry_points
    eps = list(_cache.get_group_all(self.namespace))
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/_cache.py", line 179, in get_group_all
    data = self._get_data_for_path(path)
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/_cache.py", line 162, in _get_data_for_path
    data = _build_cacheable_data(path)
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/_cache.py", line 107, in _build_cacheable_data
    real_groups = importlib_metadata.entry_points()
  File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 971, in entry_points
    return SelectableGroups.load(eps).select(**params)
  File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 429, in load
    ordered = sorted(eps, key=by_group)
  File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 968, in <genexpr>
    eps = itertools.chain.from_iterable(
  File "/usr/local/lib/python3.10/importlib/metadata/_itertools.py", line 15, in unique_everseen
    for element in iterable:
  File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 535, in <genexpr>
    resolver(context) for resolver in cls._discover_resolvers()
  File "/usr/local/lib/python3.10/site-packages/importlib_metadata/__init__.py", line 417, in find_distributions
    found = self._search_paths(context.pattern, context.path)
AttributeError: 'Context' object has no attribute 'pattern'