bndr / bndr/pipreqs

pipreqs invalid syntax

Open
#291 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

What is the solution of this ?

```sh

ERROR: Failed on file: C:\Users\abira\OneDrive\Desktop\QuranSunnah\surah_setup.py
Traceback (most recent call last):
File "C:\Users\abira\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\abira\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\abira\AppData\Local\Programs\Python\Python310\Scripts\pipreqs.exe\__main__.py", line 7, in
File "C:\Users\abira\AppData\Local\Programs\Python\Python310\lib\site-packages\pipreqs\pipreqs.py", line 488, in main
init(args)
File "C:\Users\abira\AppData\Local\Programs\Python\Python310\lib\site-packages\pipreqs\pipreqs.py", line 415, in init
candidates = get_all_imports(input_path,
File "C:\Users\abira\AppData\Local\Programs\Python\Python310\lib\site-packages\pipreqs\pipreqs.py", line 131, in get_all_imports
raise exc
File "C:\Users\abira\AppData\Local\Programs\Python\Python310\lib\site-packages\pipreqs\pipreqs.py", line 117, in get_all_imports
tree = ast.parse(contents)
File "C:\Users\abira\AppData\Local\Programs\Python\Python310\lib\ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "", line 29
if user_input1 == #here :
^^^^^^^
SyntaxError: invalid syntax

```

Contributor guide

Open the contributing guide

Research direction

Start with pipreqs/pipreqs.py at the AST parsing path mentioned in the traceback, especially lines 117 and 131, and compare it with the reported failure at surah_setup.py line 29. A contribution would need a repository-level reproduction showing that pipreqs mishandles valid Python; the issue currently provides no command, test case, or expected project change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.