leocrawford / picasawebsync

Sync local directories with picasaweb
MIT License
59 stars 16 forks source link

import Image does'nt work #38

Closed andreasqueri closed 8 years ago

andreasqueri commented 8 years ago

On my system if yuo import the Image module with "import Image" fail when it try to open image in the shrink function at line "im = Image.open(path)". Else if you import the module with "from PIL import Image" it works. This is an example:

[andre@cubox 2016_Carlotta]$ python2
Python 2.7.11 (default, Dec 11 2015, 05:34:18)
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
>>> im = Image.open("IMG_20160101_175708.jpg")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/PIL/Image.py", line 2286, in open
    % (filename if filename else fp))
IOError: cannot identify image file 'IMG_20160101_175708.jpg'
>>> from PIL import Image
>>> im = Image.open("IMG_20160101_175708.jpg")
>>>
leocrawford commented 8 years ago

Thanks for the report. For future reference this seems to relate to: http://stackoverflow.com/questions/19230991/image-open-cannot-identify-image-file-python

Would you like to submit a pull request to fix this?

leocrawford commented 8 years ago

No problems with merge, so closing