Need to make sure the link we find isn't a 404. If it is, use the src of the image instead of the href it links to.
randomdrake:~$ ./nasa_apod_desktop.py
Starting
Using default resolution of 1680x1050
Using automatically detected path: /home/randomdrake/Downloads/nasa-apod-backgrounds
Downloading contents of the site to find the image name
Grabbing the image URL
Found name of image: tethysrings_cassini_1920.jpg
File exists, moving on
Opening local image
Traceback (most recent call last):
File "./nasa_apod_desktop.py", line 284, in
resize_image(filename)
File "./nasa_apod_desktop.py", line 225, in resize_image
image = Image.open(filename)
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1980, in open
raise IOError("cannot identify image file")
IOError: cannot identify image file
Need to make sure the link we find isn't a 404. If it is, use the src of the image instead of the href it links to.
randomdrake:~$ ./nasa_apod_desktop.py Starting Using default resolution of 1680x1050 Using automatically detected path: /home/randomdrake/Downloads/nasa-apod-backgrounds Downloading contents of the site to find the image name Grabbing the image URL Found name of image: tethysrings_cassini_1920.jpg File exists, moving on Opening local image Traceback (most recent call last): File "./nasa_apod_desktop.py", line 284, in
resize_image(filename)
File "./nasa_apod_desktop.py", line 225, in resize_image
image = Image.open(filename)
File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1980, in open
raise IOError("cannot identify image file")
IOError: cannot identify image file