Tilecache as wsgi on Windows 2003

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Tilecache as wsgi on Windows 2003


I have Tilecache running correctly as cgi in a Windows 2003 server width Python 2.7.5.

But if I try to run as wsgi I have this error:

An error occurred: The _imaging C module is not installed
  File "C:\Python27\lib\site-packages\tilecache-2.11-py2.7.egg\TileCache\Service.py", line 303, in wsgiHandler
    format, image = service.dispatchRequest( fields, path_info, req_method, host )
  File "C:\Python27\lib\site-packages\tilecache-2.11-py2.7.egg\TileCache\Service.py", line 208, in dispatchRequest
    return self.renderTile(tile, params.has_key('FORCE'))
  File "C:\Python27\lib\site-packages\tilecache-2.11-py2.7.egg\TileCache\Service.py", line 138, in renderTile
    data = layer.render(tile, force=force)
  File "C:\Python27\lib\site-packages\tilecache-2.11-py2.7.egg\TileCache\Layer.py", line 436, in render
    image = self.renderMetaTile(metatile, tile)
  File "C:\Python27\lib\site-packages\tilecache-2.11-py2.7.egg\TileCache\Layer.py", line 408, in renderMetaTile
    subimage = image.crop((minx, miny, maxx, maxy))
  File "C:\Python27\lib\site-packages\PIL\Image.py", line 763, in crop
  File "C:\Python27\lib\site-packages\PIL\ImageFile.py", line 164, in load
  File "C:\Python27\lib\site-packages\PIL\PngImagePlugin.py", line 381, in load_prepare
  File "C:\Python27\lib\site-packages\PIL\ImageFile.py", line 231, in load_prepare
    self.im = Image.core.new(self.mode, self.size)
  File "C:\Python27\lib\site-packages\PIL\Image.py", line 37, in __getattr__
    raise ImportError("The _imaging C module is not installed")

My wsgi file content is:

#!C:/Python27/python.exe -u

import os, sys, site

base_path, tail = os.path.split(__file__)
tilecachecfg = os.path.join(base_path, 'tilecache.cfg')


from TileCache.Service import Service, wsgiHandler

cfgfiles = ( tilecachecfg )

theService = {}
def wsgiApp (environ, start_response):
    global theService

    cfgs  = cfgfiles
    if not theService:
        theService = Service.load(cfgs)
    return wsgiHandler(environ, start_response, theService)

application = wsgiApp

Has anyone had this problem in the past? How can I fix it?


Tilecache mailing list
[hidden email]