title: Migrating from Python 2.7 to 3.8: "TypeError: a bytes-like object is required, not 'str'"
body: <p>In one of the files I am seeing issue:</p>
  
  <pre><code>"TypeError: a bytes-like object is required, not 'str'"
  </code></pre>
  
  <p>Code snippet: </p>
  
  <pre><code>def run_process(self, cmd):
          sh = self.is_win()
          child = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=sh)
          output = child.communicate()[0].strip().split('\n')
          return output, child.returncode
  </code></pre>