Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 698: invalid start byte #4

Closed
ashifpm opened this issue Feb 7, 2021 · 4 comments

Comments

@ashifpm
Copy link

ashifpm commented Feb 7, 2021

Traceback (most recent call last):
File "C:\Users\Ashif\Desktop\red-python-scripts-main\windows10-wifi.py", line 43, in
profile_info = subprocess.run(["netsh", "wlan", "show", "profile", name], capture_output = True).stdout.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 698: invalid start byte

@daman9999
Copy link

you are working on windows machine since utf-8 is wrong encoding for that , utf-8 is default encoding for this if you write stdout.decode() instead replace it with stdout.decode("cp1252") it will work ;)

@davidbombal
Copy link
Owner

Thanks @daman9999

@TonyLeeIT
Copy link

you are working on windows machine since utf-8 is wrong encoding for that , utf-8 is default encoding for this if you write stdout.decode() instead replace it with stdout.decode("cp1252") it will work ;)

tks so much

@luccavp12
Copy link

you are working on windows machine since utf-8 is wrong encoding for that , utf-8 is default encoding for this if you write stdout.decode() instead replace it with stdout.decode("cp1252") it will work ;)

Your idea helped fix my random issue. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants