bndr / bndr/pipreqs

Errors occured when rusing the 'pipreqs' command

Open
#286 5 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

`(lastFYP_venv) PS C:\Users\Jun\Desktop\Last_FYP> pipreqs`

```
Traceback (most recent call last):
File "C:\Users\Jun\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Jun\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Jun\Desktop\Last_FYP\lastFYP_venv\Scripts\pipreqs.exe\__main__.py", line 7, in
File "c:\users\jun\desktop\last_fyp\lastfyp_venv\lib\site-packages\pipreqs\pipreqs.py", line 488, in main
init(args)
File "c:\users\jun\desktop\last_fyp\lastfyp_venv\lib\site-packages\pipreqs\pipreqs.py", line 415, in init
candidates = get_all_imports(input_path,
File "c:\users\jun\desktop\last_fyp\lastfyp_venv\lib\site-packages\pipreqs\pipreqs.py", line 115, in get_all_imports
contents = f.read()
File "C:\Users\Jun\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 454: character maps to
```

Contributor guide

Open the contributing guide

Research direction

The traceback points to pipreqs.py:115 in get_all_imports, reached through init at line 415. Reproduce the command on the reported Windows/Python 3.9 setup and determine the intended handling for the cp1252 decode failure; the issue does not specify the expected behavior or a test file.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.