title: 'es' is not recognized as an internal or external command
body: <p>when I run a python script from powershell on windows 10, the script runs successfully but at the end it outputs the following even though I have never typed any such command like <code>es</code></p>
  <pre><code>'es' is not recognized as an internal or external command,
  </code></pre>
  <p>And once this error message is shown I also find an empty file being generated by the following name(it has no extension):</p>
  <pre><code> datetime(2021
  </code></pre>
  <p>The error is intermittent , happens 20% of the times for running the same python script from same directory from same powershell.</p>
  <p>I am running <code>python myfile.py</code></p>
  <p>Here is the code in <code>myfile.py</code></p>
  <pre><code>from __future__ import print_function
  from dateutil.relativedelta import relativedelta
  from device_facade_v2 import DeviceFacade
  from google.auth.transport.requests import Request
  from google_auth_oauthlib.flow import InstalledAppFlow
  from googleapiclient.discovery import build
  from pathlib import Path
  from ppadb.client import Client as AdbClient
  import colorama
  import pprint as pp
  import requests
  import socket
  
  global device_id
  
      
  filepath = str(Path(__file__).resolve())
  if &quot;/&quot; in filepath:
      pathsplit = filepath.split(&quot;/&quot;)
  else:
      pathsplit = filepath.split(&quot;\\&quot;)
  
  root = &quot;/&quot;.join(pathsplit[:-1])
  
  adb_host_ip = socket.gethostbyname(socket.gethostname())
  
  
  def get_adb_devices():
      client = AdbClient(host=&quot;127.0.0.1&quot;, port=5037)
      devices = client.devices()
  
      adb_device_list = []
      for device in devices:
          try:
              print()
              print(&quot;DEVICE:&quot; + device.serial)
              prop = device.shell(&quot;getprop&quot;)
              proplines = prop.split(&quot;\n&quot;)
              for propline in proplines:
                  if &quot;[ro.product.board]&quot; in propline:
                      # print(propline)
                      board = (
                          propline.split(&quot;:&quot;)[1].replace(&quot;[&quot;, &quot;&quot;).replace(&quot;]&quot;, &quot;&quot;).strip()
                      )
                  if &quot;[ro.product.brand]&quot; in propline:
                      # print(propline)
                      brand = (
                          propline.split(&quot;:&quot;)[1].replace(&quot;[&quot;, &quot;&quot;).replace(&quot;]&quot;, &quot;&quot;).strip()
                      )
                  if &quot;[ro.product.model]&quot; in propline:
                      print(propline)
                      model = (
                          propline.split(&quot;:&quot;)[1].replace(&quot;[&quot;, &quot;&quot;).replace(&quot;]&quot;, &quot;&quot;).strip()
                      )
  
              try:
                  socket.inet_aton(device.serial.split(&quot;:&quot;)[0])
                  print(device.serial.split(&quot;:&quot;)[0])
                  adb_device_list.append(
                      {
                          &quot;serial&quot;: device.serial,
                          &quot;ip_address&quot;: device.serial.split(&quot;:&quot;)[0],
                          &quot;board&quot;: board,
                          &quot;brand&quot;: brand,
                          &quot;model&quot;: model,
                      }
                  )
                  continue
              except socket.error:
                  pass
  
              ip_address_blob = device.shell(&quot;ip addr&quot;)
              ip_address_splits = ip_address_blob.split(&quot; &quot;)
              ip_address_splits_cleaned = []
              for comp in ip_address_splits:
                  if &quot;192.168.&quot; not in comp:
                      continue
                  ip_address_splits_cleaned.append(comp)
              print(ip_address_splits_cleaned)
  
              for comp in ip_address_splits:
                  if len(comp) &lt; 11 or len(comp) &gt; 18:
                      continue
                  if &quot;192.168.&quot; not in comp:
                      continue
                  if &quot;192.168.0.255&quot; in comp:
                      continue
                  if &quot;192.168.68.255&quot; in comp:
                      continue
                  try:
                      socket.inet_aton(comp)
                      adb_device_list.append(
                          {
                              &quot;serial&quot;: device.serial,
                              &quot;ip_address&quot;: comp,
                              &quot;board&quot;: board,
                              &quot;brand&quot;: brand,
                              &quot;model&quot;: model,
                          }
                      )
                      # print(comp.split(&quot;/&quot;)[0])
                  except socket.error:
                      pass
          except Exception as e:
              pass
  
      return adb_device_list
  
  
  if __name__ == &quot;__main__&quot;:
  
      connected_devices = get_adb_devices()
      print(&quot;\n\nconnected_devices(raw):&quot;)
      pp.pprint(connected_devices)
  
      print(&quot;\n\nconnected_devices(unsorted):&quot;)
      for connected_device in connected_devices:
          connected_device[&quot;port&quot;] = &quot;&quot;
          try:
              connected_device[&quot;port&quot;] = connected_device[&quot;serial&quot;].split(&quot;:&quot;)[1]
          except Exception as e:
              pass
          print(connected_device[&quot;serial&quot;], connected_device[&quot;model&quot;])
  
      connected_devices = sorted(connected_devices, key=lambda k: k[&quot;port&quot;])
  
      print(&quot;\n\n {} connected_devices(sorted):&quot;.format(len(connected_devices)))
      for connected_device in connected_devices:
          print(connected_device[&quot;serial&quot;], connected_device[&quot;model&quot;])
  </code></pre>
  <p><strong>Added code as per the request even though I dont think code is relevant here. IT IS HAPPENING WITH ALL MY PYTHON FILES IRRESPECTIVE OF WHAT CODE IS IN THAT FILE.</strong></p>
  <p>And here is the screenhot of the output on powershell:
  (Check the last line for the error message, ie after showing all the successful outputs)
  <a href="https://snipboard.io/RhNanP.jpg" rel="nofollow noreferrer">https://snipboard.io/RhNanP.jpg</a></p>