title: PIL Image.open() variable input AttributeError
body: <p>I am trying to display an image on Tkinter using the filepath as an Entry object. It was necessary to use PIL as it was a .jpg file. But even though I am able to retrieve the filepath from the tk.Entry as a string, I am not able to display it onto the Tkinter Canvas. Here are some important lines of the code regarding the problem. </p>
  
  <pre><code>path = StringVar()
  e1 = Entry(window, width=60, textvariable=path)
  e1.pack()
  
  canvas = Canvas(window, width=400, height=300)
  canvas.pack()
  
  img = ImageTk.PhotoImage(Image.open(path.get()))
  canvas.create_image(20, 20, anchor=NW, image=img)
  </code></pre>
  
  <p>The error I'm getting is:</p>
  
  <pre><code>    Traceback (most recent call last):
    File ".\GUI.py", line 60, in &lt;module&gt;
      img = ImageTk.PhotoImage(Image.open(path.get()))
    File "C:\Program Files\Python36\lib\site-packages\PIL\Image.py", line 2549, in open
      fp = io.BytesIO(fp.read())
  AttributeError: 'str' object has no attribute 'read'
  </code></pre>
  
  <p>How do I go about solving this. Any help would be appreciated. Thank you</p>