Error in python 3.10
- Dominant language
- Python
- Stars
- 7.5k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
Traceback (most recent call last):
File "/mnt/f/python/stocks/projects/.venv310/bin/pipreqs", line 8, in
sys.exit(main())
File "/mnt/f/python/stocks/projects/.venv310/lib/python3.10/site-packages/pipreqs/pipreqs.py", line 488, in main
init(args)
File "/mnt/f/python/stocks/projects/.venv310/lib/python3.10/site-packages/pipreqs/pipreqs.py", line 415, in init
candidates = get_all_imports(input_path,
File "/mnt/f/python/stocks/projects/.venv310/lib/python3.10/site-packages/pipreqs/pipreqs.py", line 131, in get_all_imports
raise exc
File "/mnt/f/python/stocks/projects/.venv310/lib/python3.10/site-packages/pipreqs/pipreqs.py", line 117, in get_all_imports
tree = ast.parse(contents)
File "/usr/lib/python3.10/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "", line 46
op=n.
^
SyntaxError: invalid syntax
Contributor guide
Research direction
Start by reproducing the traceback with pipreqs against the project containing the reported line 46, then inspect pipreqs/pipreqs.py around get_all_imports and the ast.parse call. Determine whether the failure is caused by the scanned input or Python 3.10 behavior; done means the cause is established and a regression test covers the resulting behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100