doryphores / pretty-apod

Pretty APOD - A pretty version of Astronomy Picture Of the Day (htttp://apod.nasa.gov)
1 stars 0 forks source link

Image download problem for 14/4/2011 #24

Closed doryphores closed 12 years ago

doryphores commented 12 years ago

Traceback (most recent call last):

File "/site-packages/django/core/handlers/base.py", line 111, in get_response response = callback(request, _callback_args, *_callback_kwargs)

File "/apod/views.py", line 53, in picture_json picture.get_image()

File "/apod/models.py", line 364, in get_image self.image.save(filename, image_file, save=False)

File "/site-packages/django/db/models/fields/files.py", line 87, in save setattr(self.instance, self.field.name, self.name)

File "/site-packages/django/db/models/fields/files.py", line 308, in set self.field.update_dimension_fields(instance, force=True)

File "/site-packages/django/db/models/fields/files.py", line 378, in update_dimension_fields width = file.width

File "/site-packages/django/core/files/images.py", line 15, in _get_width return self._get_image_dimensions()[0]

TypeError: 'NoneType' object has no attribute 'getitem'

doryphores commented 12 years ago

Not much can be done about this one. PIL simply cannot get the size information from the file. Fixed by manually uploading a fixed version.