title: Got codec error in VSCode with Python while using windows PowerShell commands
body: <p>I'm new here, but I'm trying to ru some basic windows shell commands from python, but I got some error
  in VSCode.</p>
  <p>I've got this error in VS Code <code>'utf-8' codec can't decode byte 0x82 in position 29: invalid start byte</code> for this line: <code>   commandOutput = subprocess.run([&quot;netsh&quot;,&quot;wlan&quot;,&quot;show&quot;,&quot;profiles&quot;], capture_output = True).stdout.decode()</code></p>
  <pre><code>import subprocess
  import re
  import os
  
  
  if os.name == 'nt':
      print(&quot;\n\n\t==== WI-FI ====\n\n\n&quot;);       
          
      commandOutput = subprocess.run([&quot;netsh&quot;,&quot;wlan&quot;,&quot;show&quot;,&quot;profiles&quot;], capture_output = True).stdout.decode()
      #print(commandOutput)
      names = (re.findall(&quot;All User Profile     : (.*)\r&quot;, commandOutput))
      #print(names)
      wifilist = list()
      if len(names) != 0:
          for name in names:
              wifiProfile = dict()
              profileInfo = subprocess.run([&quot;netsh&quot;, &quot;wlan&quot;, &quot;show&quot;, &quot;profile&quot;, name], capture_output = True).stdout.decode() # SSID
              if re.search(&quot;Security key           : Absent&quot;,profileInfo):
                  continue
              else:
                  wifiProfile[&quot;ssid&quot;] = name
                  wifiProfilePassword = subprocess.run([&quot;netsh&quot;, &quot;wlan&quot;, &quot;show&quot;, &quot;profile&quot;, name, &quot;key=clear&quot;], capture_output = True).stdout.decode()    
                  password = re.search(&quot;Key Content            : (.*)\r&quot;,wifiProfilePassword)
                  if password == None: 
                      wifiProfile[&quot;password&quot;] = None
                  else:
                      wifiProfile[&quot;password&quot;] = password[1] 
                  wifilist.append(wifiProfile)
                          
      for x in range(len(wifilist)):
          print(wifilist[x])
              
      commandOutput = subprocess.run([&quot;netsh&quot;, &quot;wlan&quot;, &quot;show&quot;, &quot;network&quot;, &quot;mode=Bssid&quot;], capture_output = True).stdout.decode()
      currentAvailableNetworksNames    = (re.findall(&quot;SSID \d : (.*)\r&quot;, commandOutput))
      #currentAvailableNetworksBSSID = (re.findall(&quot;         Signal             : (\d+)%\r&quot;, commandOutput))
      #currentAvailableNetworksStrength = (re.findall(&quot;         Signal             : (\d+)%\r&quot;, commandOutput))
      #print(currentAvailableNetworksNames);          
      for x in range(len(currentAvailableNetworksNames)):
          print(currentAvailableNetworksNames[x])
  
      for x in range(len(wifilist)):
          if wifilist[x][&quot;ssid&quot;] in currentAvailableNetworksNames: 
              print(wifilist[x])
  else:
      print(&quot;NOT SUPPORTED&quot;);`
  </code></pre>