Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
No module named 'tools'
Cloud Custodian command executed at Wed Dec 22 15:00:11 CST 2021:
/usr/local/bin/c7n-org run -c /opt/cloud-custodian-gcp/etc/c7n-org-config/all-projects.yml -s /tmp/delete-me -u /opt/cloud-custodian-gcp/policies/dataflow-job-notify.yml
Output of command:
Traceback (most recent call last):
File "/usr/local/bin/c7n-org", line 8, in <module>
sys.exit(cli())
File "/opt/custodian/lib64/python3.6/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/opt/custodian/lib64/python3.6/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/opt/custodian/lib64/python3.6/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/custodian/lib64/python3.6/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/custodian/lib64/python3.6/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/opt/custodian/lib64/python3.6/site-packages/c7n_org/cli.py", line 666, in run
config, use, debug, verbose, accounts, tags, policy, policy_tags=policy_tags)
File "/opt/custodian/lib64/python3.6/site-packages/c7n_org/cli.py", line 193, in init
load_available()
File "/opt/custodian/lib64/python3.6/site-packages/c7n/resources/__init__.py", line 58, in load_available
load_resources(['%s.*' % s for s in found])
File "/opt/custodian/lib64/python3.6/site-packages/c7n/resources/__init__.py", line 26, in load_resources
_, not_found = p.get_resource_types(pmap[pname])
File "/opt/custodian/lib64/python3.6/site-packages/c7n/provider.py", line 53, in get_resource_types
cls.resource_map, resource_types)
File "/opt/custodian/lib64/python3.6/site-packages/c7n/provider.py", line 76, in import_resource_classes
mod_map[rmodule] = importlib.import_module(rmodule)
File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/opt/custodian/lib64/python3.6/site-packages/c7n_gcp/resources/resourcemanager.py", line 5, in <module>
from tools.c7n_gcp.c7n_gcp.filters.iampolicy import IamPolicyFilter
ModuleNotFoundError: No module named 'tools'
Command executed with return code: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment