pants: NotADirectoryError for `.bootstrap` when running bandit
via @asherf : “I have only seen it once (in CI), however, this is concerning.”
𐄂 Bandit failed.
Traceback (most recent call last):
File "/tmp/process-executionIgo8Kg/bandit.pex/.bootstrap/pex/pex.py", line 401, in execute
File "/tmp/process-executionIgo8Kg/bandit.pex/.bootstrap/pex/pex.py", line 333, in _wrap_coverage
File "/tmp/process-executionIgo8Kg/bandit.pex/.bootstrap/pex/pex.py", line 364, in _wrap_profiling
File "/tmp/process-executionIgo8Kg/bandit.pex/.bootstrap/pex/pex.py", line 452, in _execute
File "/tmp/process-executionIgo8Kg/bandit.pex/.bootstrap/pex/pex.py", line 549, in execute_entry
File "/tmp/process-executionIgo8Kg/bandit.pex/.bootstrap/pex/pex.py", line 556, in execute_module
File "/usr/local/lib/python3.8/runpy.py", line 202, in run_module
mod_name, mod_spec, code = _get_module_details(mod_name)
File "/usr/local/lib/python3.8/runpy.py", line 143, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/local/lib/python3.8/runpy.py", line 110, in _get_module_details
__import__(pkg_name)
File "/home/toolchain/.pex/installed_wheels/15d2aa75fdcfe6784df2a47644a713e788abe936/bandit-1.6.2-py2.py3-none-any.whl/bandit/__init__.py", line 19, in <module>
from bandit.core import config # noqa
File "/home/toolchain/.pex/installed_wheels/15d2aa75fdcfe6784df2a47644a713e788abe936/bandit-1.6.2-py2.py3-none-any.whl/bandit/core/__init__.py", line 17, in <module>
from bandit.core import config # noqa
File "/home/toolchain/.pex/installed_wheels/15d2aa75fdcfe6784df2a47644a713e788abe936/bandit-1.6.2-py2.py3-none-any.whl/bandit/core/config.py", line 22, in <module>
from bandit.core import extension_loader
File "/home/toolchain/.pex/installed_wheels/15d2aa75fdcfe6784df2a47644a713e788abe936/bandit-1.6.2-py2.py3-none-any.whl/bandit/core/extension_loader.py", line 118, in <module>
MANAGER = Manager()
File "/home/toolchain/.pex/installed_wheels/15d2aa75fdcfe6784df2a47644a713e788abe936/bandit-1.6.2-py2.py3-none-any.whl/bandit/core/extension_loader.py", line 35, in __init__
self.load_formatters(formatters_namespace)
File "/home/toolchain/.pex/installed_wheels/15d2aa75fdcfe6784df2a47644a713e788abe936/bandit-1.6.2-py2.py3-none-any.whl/bandit/core/extension_loader.py", line 40, in load_formatters
self.formatters_mgr = extension.ExtensionManager(
File "/home/toolchain/.pex/installed_wheels/00819186ecdcbd98d3ccae67a09c673ec7165d77/stevedore-3.0.0-py3-none-any.whl/stevedore/extension.py", line 101, in __init__
extensions = self._load_plugins(invoke_on_load,
File "/home/toolchain/.pex/installed_wheels/00819186ecdcbd98d3ccae67a09c673ec7165d77/stevedore-3.0.0-py3-none-any.whl/stevedore/extension.py", line 186, in _load_plugins
for ep in self.list_entry_points():
File "/home/toolchain/.pex/installed_wheels/00819186ecdcbd98d3ccae67a09c673ec7165d77/stevedore-3.0.0-py3-none-any.whl/stevedore/extension.py", line 175, in list_entry_points
eps = list(_cache.get_group_all(self.namespace))
File "/home/toolchain/.pex/installed_wheels/00819186ecdcbd98d3ccae67a09c673ec7165d77/stevedore-3.0.0-py3-none-any.whl/stevedore/_cache.py", line 171, in get_group_all
data = self._get_data_for_path(path)
File "/home/toolchain/.pex/installed_wheels/00819186ecdcbd98d3ccae67a09c673ec7165d77/stevedore-3.0.0-py3-none-any.whl/stevedore/_cache.py", line 148, in _get_data_for_path
digest, path_values = _hash_settings_for_path(path)
File "/home/toolchain/.pex/installed_wheels/00819186ecdcbd98d3ccae67a09c673ec7165d77/stevedore-3.0.0-py3-none-any.whl/stevedore/_cache.py", line 86, in _hash_settings_for_path
mtime = _get_mtime(entry)
File "/home/toolchain/.pex/installed_wheels/00819186ecdcbd98d3ccae67a09c673ec7165d77/stevedore-3.0.0-py3-none-any.whl/stevedore/_cache.py", line 62, in _get_mtime
s = os.stat(name)
NotADirectoryError: [Errno 20] Not a directory: '/tmp/process-executionIgo8Kg/bandit.pex/.bootstrap'
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (26 by maintainers)
Commits related to this issue
- Hotfix Bandit breaking from stevedore 3.0 release (#10319) CI starting breaking about 4 hours ago, when a transitive dep of `Bandit` called [Stevedore had its 3.0 release](https://pypi.org/project/st... — committed to pantsbuild/pants by Eric-Arellano 4 years ago
- Hotfix Bandit breaking from stevedore 3.0 release (#10319) CI starting breaking about 4 hours ago, when a transitive dep of `Bandit` called [Stevedore had its 3.0 release](https://pypi.org/project/st... — committed to stuhood/pants by Eric-Arellano 4 years ago
- Stop pinning `stevedore<3` by default for Bandit (#12681) Now that we run Bandit with a `VenvPex`, https://github.com/pantsbuild/pants/issues/10316 should not happen anymore so there is no need to pi... — committed to pantsbuild/pants by Eric-Arellano 3 years ago
@cristianmatache to work around, can you have Pants use a constraints file that is different from the troublesome one? In other words, can you omit
dev-requirements.txtand just userequirements.txtwhen generating the constraints file for Pants consumption? I ask this assuming thatdev-requirements.txtrepresents requirements to run tools like bandit on your own outside Pants.@stuhood and @asherf this is fairly un-useful as it stands. Can either of you provide a repro? That would make debugging this much more sane.