Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

AttributeError: 'module' object has no attribute 'gen_config' #5

Closed
obi1kenobi opened this issue Jul 11, 2016 · 4 comments
Closed

AttributeError: 'module' object has no attribute 'gen_config' #5

obi1kenobi opened this issue Jul 11, 2016 · 4 comments
Labels

Comments

@obi1kenobi
Copy link

Thank you for making this very interesting plugin. I'm trying to use it in my project, but I'm getting a strange error whenever I install the plugin. In a virtual environment with Python 2.7.10 on OSX:

$ pip install bandit
Successfully installed bandit-1.0.1

$ bandit -r .
[main]  INFO    profile include tests: None
[main]  INFO    profile exclude tests: None
[main]  INFO    cli include tests: None
[main]  INFO    cli exclude tests: None
[main]  INFO    running on Python 2.7.10
< ... continues running fine ... >

$ pip install bandit-high-entropy-string
Successfully installed bandit-high-entropy-string-2.0.1

$ bandit -r .
[main]  INFO    profile include tests: None
[main]  INFO    profile exclude tests: None
[main]  INFO    cli include tests: None
[main]  INFO    cli exclude tests: None
Traceback (most recent call last):
  File "/<path_to_virtual_env>/bin/bandit", line 11, in <module>
    sys.exit(main())
  File "/<path_to_virtual_env>/lib/python2.7/site-packages/bandit/cli/main.py", line 304, in main
    ignore_nosec=args.ignore_nosec)
  File "/<path_to_virtual_env>/lib/python2.7/site-packages/bandit/core/manager.py", line 65, in __init__
    self.b_ts = b_test_set.BanditTestSet(config, profile)
  File "/<path_to_virtual_env>/lib/python2.7/site-packages/bandit/core/test_set.py", line 37, in __init__
    self._load_tests(config, self.plugins)
  File "/<path_to_virtual_env>/lib/python2.7/site-packages/bandit/core/test_set.py", line 93, in _load_tests
    cfg = genner.gen_config(plugin.plugin._takes_config)
AttributeError: 'module' object has no attribute 'gen_config'

Please let me know if there is anything I can do to help get to the bottom of this!

@ryan-lane
Copy link
Contributor

Hm. Looks like bandit may have added something since when I last published this. I need to add a function to the module. Thanks for reporting. I'll get a fix in soon!

@ryan-lane
Copy link
Contributor

If you pip upgrade your bandit-high-entropy-string to 2.0.2, it should work!

@obi1kenobi
Copy link
Author

Confirmed working in 2.0.2, thank you for fixing it promptly!

@ryan-lane
Copy link
Contributor

Excellent. Thanks for confirming!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants