[MapProxy] Not loading images ("PIL is not available")

pschneider at pantek.com pschneider at pantek.com
Mon Jul 9 12:51:23 PDT 2012


Hi there, I'm having troubles loading any images from the mapproxy demo WMS.  The machine is a Win2k8 R2 server with apache 2.2, python 2.7.3 and associated tools installed.  I confirm that PIL is installed and importable from the python shell.  To hedge my bets I even reinstalled using the exact procedure on the site.  Since I'm using mod_wsgi, I did not put it in a virtualenv, per the instructions.

The error I keep getting the following errors in my apache below:

"[Mon Jul 09 13:41:29 2012] [error] [client 127.0.0.1] ImportError: PIL is not available, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1] Traceback (most recent call last):, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\wsgiapp.py", line 133, in __call__, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     resp = self.handlers[handler_name].handle(req), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\service\\ows.py", line 38, in handle, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     return self.services[service].handle(req), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\service\\base.py", line 30, in handle, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     return handler(parsed_req), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\service\\wms.py", line 108, in map, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     renderer.render(merger), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\service\\wms.py", line 459, in render, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     layer_merger), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\util\\async.py", line 204, in _single_call, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     result = func(*args), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\service\\wms.py", line 501, in _render_layer, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     layer_img = layer.get_map(self.query), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\layer.py", line 292, in get_map, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     return layer.get_map(query), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\layer.py", line 360, in get_map, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     resp = self._image(src_query), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\layer.py", line 397, in _image, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     tile_collection = self.tile_manager.load_tile_coords(affected_tile_coords, with_metadata=query.tiled_only), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\cache\\tile.py", line 126, in load_tile_coords, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     created_tiles = creator.create_tiles(uncached_tiles), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\cache\\tile.py", line 227, in create_tiles, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     created_tiles = self._create_meta_tiles(meta_tiles), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\cache\\tile.py", line 299, in _create_meta_tiles, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     created_tiles.extend(self._create_meta_tile(meta_tile)), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\cache\\tile.py", line 311, in _create_meta_tile, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     tile_size, self.tile_mgr.image_opts), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\cache\\tile.py", line 463, in split_meta_tiles, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     splitter = TileSplitter(meta_tile, image_opts), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\image\\tile.py", line 96, in __init__, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     self.meta_img = meta_tile.as_image(), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\image\\__init__.py", line 90, in as_image, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     img = Image.open(self._buf), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]   File "C:\\Python27\\lib\\site-packages\\mapproxy\\platform\\image.py", line 39, in __getattr__, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1]     raise ImportError('PIL is not available'), referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm
[Mon Jul 09 13:41:30 2012] [error] [client 127.0.0.1] ImportError: PIL is not available, referer: http://localhost/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fjpeg&wms_layer=osm


More information about the MapProxy mailing list