ptrblck:

print(image) print(type(image)) image = Image.open(image)


I have used your code. This is what I got:
<PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=695x500 at 0x7F3D941C15F8>
<class 'PIL.JpegImagePlugin.JpegImageFile'>

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-27-3d8674b159a4> in <module>()
      1 print(image)
      2 print(type(image))
----> 3 image = Image.open(image)

/opt/conda/lib/python3.6/site-packages/PIL/Image.py in open(fp, mode)
   2587         exclusive_fp = True
   2588 
-> 2589     prefix = fp.read(16)
   2590 
   2591     preinit()

AttributeError: 'JpegImageFile' object has no attribute 'read'