Skip to content

Unable to find qualified name for module #725

Closed Answered by zachliu
joeypencil asked this question in Q&A
Discussion options

You must be logged in to vote

the source code

bandit/bandit/core/utils.py

Lines 139 to 143 in c8d5f77

(head, tail) = os.path.split(path)
if head == "" or tail == "":
raise InvalidModulePath(
f'Invalid python file path: "{path}" Missing path or file name'
)

mandates both "head" and "tail"

so we need to make sure the path has both, easy peasy lemon squeezy:

instead of

bandit myfile.py

use

bandit ./myfile.py

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@ericwb
Comment options

@HacKanCuBa
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@HacKanCuBa
Comment options

Answer selected by joeypencil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants