0

I'm Trying to decode bytes to utf-8 this is my script

import subprocess

meta_data = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles'])
print(type(meta_data.decode("utf-8")))

Can Someone help me to fix that?

error: error UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 31: invalid start byte

Med Op
  • 17
  • 2
  • this is the error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 31: invalid start byte – Med Op Nov 05 '22 at 18:54
  • Please [edit] your question and post the [*full text* of any errors or tracebacks](https://meta.stackoverflow.com/q/359146). – MattDMo Nov 05 '22 at 18:54
  • We can't know which encoding your Windows is set up to emit; probably check with `chcp` – tripleee Nov 05 '22 at 19:26

0 Answers0