UnicodeDecodeError: 'utf-8' codec can't decode byte
See original GitHub issueI just installed pipreqs for the first time. This is what it does:
$ pipreqs $(pwd)
Traceback (most recent call last):
File "/Users/tillmann/dev/textSum/.direnv/python-3.8.3/bin/pipreqs", line 10, in <module>
sys.exit(main())
File "/Users/tillmann/dev/textSum/.direnv/python-3.8.3/lib/python3.8/site-packages/pipreqs/pipreqs.py", line 470, in main
init(args)
File "/Users/tillmann/dev/textSum/.direnv/python-3.8.3/lib/python3.8/site-packages/pipreqs/pipreqs.py", line 406, in init
candidates = get_all_imports(input_path,
File "/Users/tillmann/dev/textSum/.direnv/python-3.8.3/lib/python3.8/site-packages/pipreqs/pipreqs.py", line 122, in get_all_imports
contents = f.read()
File "/usr/local/bin/../Cellar/python@3.8/3.8.3_2/bin/../Frameworks/Python.framework/Versions/3.8/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb1 in position 81: invalid start byte
Am I doing something wrong?
$ neofetch
'c. tillmann@MacBook-Pro
,xNMM. --------------------
.OMMMMo OS: macOS Catalina 10.15.5 19F101 x86_64
OMMM0, Host: MacBookPro15,1
.;loddo:' loolloddol;. Kernel: 19.5.0
cKMMMMMMMMMMNWMMMMMMMMMM0: Uptime: 17 days, 14 hours, 5 mins
.KMMMMMMMMMMMMMMMMMMMMMMMWd. Packages: 115 (brew)
XMMMMMMMMMMMMMMMMMMMMMMMX. Shell: zsh 5.7.1
;MMMMMMMMMMMMMMMMMMMMMMMM: Resolution: 1680x1050@2x, 3840x1600@2x, 1050x1680@2x
:MMMMMMMMMMMMMMMMMMMMMMMM: DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX. WM: Quartz Compositor
kMMMMMMMMMMMMMMMMMMMMMMMMWd. WM Theme: Blue (Light)
.XMMMMMMMMMMMMMMMMMMMMMMMMMMk Terminal: Apple_Terminal
.XMMMMMMMMMMMMMMMMMMMMMMMMK. Terminal Font: HackNerdFontComplete-Regular
kMMMMMMMMMMMMMMMMMMMMMMd CPU: Intel i7-8850H (12) @ 2.60GHz
;KMMMMMMMWXXWMMMMMMMk. GPU: Intel UHD Graphics 630, Radeon Pro 560X
.cooc,. .,coo:. Memory: 10080MiB / 16384MiB
$ python -V
Python 3.8.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:13
Top Results From Across the Web
UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c
Sometimes I get characters like this œ that cause the UnicodeDecodeError error. I need to be able to make the string UTF-8 with...
Read more >Python3 Fix→ UnicodeDecodeError: 'utf-8' codec can't decode ...
Open your CSV in Sublime Text/Notepad · Go to File → Save With Encoding (Save As in Notepad) · Select UTF-8 for your...
Read more >UnicodeDecodeError utf-8 codec can t decode byte in position ...
UnicodeDecodeError utf-8 codec can t decode byte in position invalid start byte. +2 votes. While I importing the file it shows
Read more >'utf8' codec can't decode byte 0xa5 in position 0: invalid start ...
Often, while reading the input files, you might encounter an UnicodeDecodeError. · Thus, the error means that the byte 0xa05 at position 0...
Read more >'utf-8' codec can't decode byte 0xff in position 0 | bobbyhadz
The Python "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte" occurs when we specify an incorrect ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Adding
ignore
parameters also work fine and you don’t have to remove virtual env!pipreqs . --ignore ".env"