red-python-scripts icon indicating copy to clipboard operation
red-python-scripts copied to clipboard

utf-8 error

Open yadavsunny111 opened this issue 4 years ago • 3 comments

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

yadavsunny111 avatar Jul 19 '21 06:07 yadavsunny111

Same for me, did you fix it?

temal32 avatar Oct 03 '21 09:10 temal32

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

anilgundal avatar Dec 10 '21 17:12 anilgundal

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?

Lord-baba99 avatar Jun 11 '22 16:06 Lord-baba99