Skip to content

Instantly share code, notes, and snippets.

@MichaelDavisTSN
Created December 23, 2021 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MichaelDavisTSN/2907f2a8e485ee388cf3d223f7a33298 to your computer and use it in GitHub Desktop.
Save MichaelDavisTSN/2907f2a8e485ee388cf3d223f7a33298 to your computer and use it in GitHub Desktop.
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