diff --git a/gramps/webapp/grampsdb/view/media.py b/gramps/webapp/grampsdb/view/media.py index b2c83cfbe..d98fb7cd3 100644 --- a/gramps/webapp/grampsdb/view/media.py +++ b/gramps/webapp/grampsdb/view/media.py @@ -34,10 +34,13 @@ from django.template import Context, RequestContext from django.http import HttpResponse ## Other Python Modules -from PIL import Image -NEW_PIL = [int(i) for i in Image.VERSION.split(".")] >= [1, 1, 7] -if not NEW_PIL: - from . import png +try: + from PIL import Image + NEW_PIL = [int(i) for i in Image.VERSION.split(".")] >= [1, 1, 7] + if not NEW_PIL: + from . import png +except: + print("WARNING: No PIL installed or available") import os ## Globals