bndr / bndr/pipreqs

runpy.py Error

Open
#472 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.5k
Forks
424
PR merge metrics
No merged PRs in 30d

Description

I am trying to use pipreqs on Python 3.9 on Win 10 and getting:

INFO: Not scanning for jupyter notebooks.
ERROR: Failed on file: C:\Users\Fried\PycharmProjects\pyInput\Main_Combinator_02.py
Traceback (most recent call last):
File "c:\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "c:\Python39\Scripts\pipreqs.exe\__main__.py", line 7, in
File "c:\Python39\lib\site-packages\pipreqs\pipreqs.py", line 609, in main
init(args)
File "c:\Python39\lib\site-packages\pipreqs\pipreqs.py", line 533, in init
candidates = get_all_imports(
File "c:\Python39\lib\site-packages\pipreqs\pipreqs.py", line 153, in get_all_imports
raise exc
File "c:\Python39\lib\site-packages\pipreqs\pipreqs.py", line 139, in get_all_imports
tree = ast.parse(contents)
File "c:\Python39\lib\ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "", line 15
W if all(k in current for k in COMBINATION):
IndentationError: expected an indented block

What is the problem here?
Thanks

Contributor guide

Open the contributing guide

Research direction

Start with Main_Combinator_02.py and inspect line 15, where the traceback reports an IndentationError during ast.parse. Compare the surrounding indentation and rerun pipreqs; done means the file parses successfully and pipreqs can continue scanning it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.