title: expected str, bytes or os.PathLike object, not NoneType (tkinter error)
body: <p>I am trying to read the file with tkinter button basically when button press the function will read the files if the files doesn't exists it will show an error if its exits than it will continue, but it throws me an error</p>
  <pre><code>expected str, bytes or os.PathLike object, not NoneType
  </code></pre>
  <p>Here are the codes:</p>
  <pre><code>def ffr(driver,filename):
      f = open(filename, &quot;r&quot;)
      lines = f.readlines()
      f= []
      for i in lines:
          f.append(i[:-1])
      wait = webdriver(driver, 10)
      for i in f:
          url = &quot;https://www.instagram.com/&quot;+i+&quot;/&quot;
          driver.get(url)
          time.sleep(1)
  
  def follow_file():
      try:
          open('reading.txt')
      except FileNotFoundError:
          Error_box_follow_file_not_found()
  </code></pre>
  <p>The Button:</p>
  <pre><code>ff= Button(root,text=&quot;read file&quot;, command=lambda:ffr(driver,follow_file()))
  ff.grid(column=1,row=19)
  </code></pre>
  <p><strong>Error box</strong></p>
  <pre><code>def Error_box_follow_file_not_found():
  messagebox.showerror('insa', &quot;Error: Please add file 'readline.txt' into path!&quot;)
  messagebox.CANCEL
  </code></pre>