bndr / bndr/pipreqs

When running pipreqs /path/to/my/project there is an Error

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

Description

Hi,
When im running pipreqs exampleproject i get the following error:
```
Traceback (most recent call last):
File "/usr/local/bin/pipreqs", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/dist-packages/pipreqs/pipreqs.py", line 488, in main
init(args)
File "/usr/local/lib/python3.9/dist-packages/pipreqs/pipreqs.py", line 415, in init
candidates = get_all_imports(input_path,
File "/usr/local/lib/python3.9/dist-packages/pipreqs/pipreqs.py", line 131, in get_all_imports
raise exc
File "/usr/local/lib/python3.9/dist-packages/pipreqs/pipreqs.py", line 117, in get_all_imports
tree = ast.parse(contents)
File "/usr/lib/python3.9/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "", line 50
prefix = # ENTER YOUR PREFIX - loaded from configdir, as string or how ever you want!
```
What am i doin wrong?

Contributor guide

Open the contributing guide

Research direction

Start in pipreqs.py at get_all_imports, especially the ast.parse call around lines 117-131, and reproduce the command using the project containing the shown line 50. Confirm whether the intended change is improved handling or documentation for this parse failure; the issue does not specify a repository change or completion criteria.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.