fix truncated image file problems

update Pillow while we're at it.
pull/1/head
eric 2016-12-12 21:42:29 -05:00
parent 5369eb7f32
commit 1b8a3b03a5
2 changed files with 5 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import unicodedata
from urlparse import urlparse
from sorl.thumbnail import get_thumbnail
from PIL import ImageFile
from django.conf import settings
from django.contrib.auth.models import User
@ -42,6 +43,9 @@ from regluit.core.parameters import (
THANKS,
)
# fix truncated file problems per http://stackoverflow.com/questions/12984426/python-pil-ioerror-image-file-truncated-with-big-images
ImageFile.LOAD_TRUNCATED_IMAGES = True
logger = logging.getLogger(__name__)
good_providers = ('Internet Archive', 'Unglue.it', 'Github', 'OAPEN Library')

View File

@ -1,7 +1,7 @@
Django==1.8.14
Fabric==1.6.0
MySQL-python==1.2.5
Pillow==2.5.3
Pillow==3.4.2
PyJWT==1.4.1
PyPDF2==1.23
PyGithub==1.15.0