pipreqs icon indicating copy to clipboard operation
pipreqs copied to clipboard

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 8033: character maps to <undefined>

Open frehburg opened this issue 2 years ago • 1 comments
trafficstars

I encountered this error message when trying to use your package

(DeepECGI) C:\Users\Surface>pipreqs C:\Users\Surface\OneDrive\Documents\MATLAB\DeepECGImaging Traceback (most recent call last): File "C:\Users\Surface\anaconda3\envs\DeepECGI\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Surface\anaconda3\envs\DeepECGI\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\Surface\anaconda3\envs\DeepECGI\Scripts\pipreqs.exe_main.py", line 7, in File "C:\Users\Surface\anaconda3\envs\DeepECGI\lib\site-packages\pipreqs\pipreqs.py", line 528, in main init(args) File "C:\Users\Surface\anaconda3\envs\DeepECGI\lib\site-packages\pipreqs\pipreqs.py", line 455, in init candidates = get_all_imports(input_path, File "C:\Users\Surface\anaconda3\envs\DeepECGI\lib\site-packages\pipreqs\pipreqs.py", line 115, in get_all_imports contents = f.read() File "C:\Users\Surface\anaconda3\envs\DeepECGI\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 8033: character maps to

Python 3.8.16

Windows 11

frehburg avatar Jun 11 '23 16:06 frehburg

Related https://github.com/bndr/pipreqs/issues/214

ahmedoid avatar Jun 22 '23 21:06 ahmedoid