title: Python error: TypeError: a bytes-like object is required, not 'str'
body: <p>i'm working to a personal project and i'm confronting a error: <code>TypeError: a bytes-like object is required, not 'str'</code></p>
  
  <p>Here is my code: 
  <a href="https://i.stack.imgur.com/Kptk9.png" rel="nofollow noreferrer">CLICK TO SEE THE CODE</a></p>
  
  <p>I want to make this script that is trying to find into the file a input text.
  Thanks!</p>