davidbombal / red-python-scripts

MIT License
2.04k stars 1.59k forks source link

utf-8 error #19

Open yadavsunny111 opened 3 years ago

yadavsunny111 commented 3 years ago

File "C:\Users\rahul\AppData\Local\Programs\Python\Python38\get_wifi.py", line 27, in command_output = subprocess.run(["netsh", "wlan", "show", "profiles"], capture_output = True).stdout.decode() UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9d in position 499: invalid start byte

temal32 commented 3 years ago

Same for me, did you fix it?

anilgundal commented 2 years ago

File "C:\Users\rahul\AppData\Local\Programs\Python\Python38\get_wifi.py", line 27, in command_output = subprocess.run(["netsh", "wlan", "show", "profiles"], capture_output = True).stdout.decode() UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9d in position 499: invalid start byte

1) OPEN windows10-wifi.py file 2) GO to end of line 27 find .decode() and change to this .decode('iso-8859-1') 3) same changes for line 50 and 59

Lord-baba99 commented 2 years ago

Hi everyone, following the method of @anilgundal the error disappears but the script closes as soon as I run it. Someone have an idea please?