我希望 Gunicorn 通过 WSGI 与 TileStache 交谈。但是当我运行这个命令时......
gunicorn "TileStache:WSGITileServer('/var/osm/bright/project/OSMBright4/tilestache.cfg')"
...我收到这些错误:
2013-03-30 23:02:41 [14300] [INFO] Starting gunicorn 0.17.2
2013-03-30 23:02:41 [14300] [INFO] Listening at: http://127.0.0.1:8000 (14300)
2013-03-30 23:02:41 [14300] [INFO] Using worker: sync
2013-03-30 23:02:41 [14305] [INFO] Booting worker with pid: 14305
Error loading Tilestache config:
2013-03-30 23:02:41 [14305] [ERROR] Exception in worker process:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 485, in spawn_worker
worker.init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 100, in init_process
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 103, in wsgi
self.callable = self.load()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 25, in load
return util.import_app(self.app_uri)
File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 381, in import_app
app = eval(obj, mod.__dict__)
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/TileStache/__init__.py", line 373, in __init__
self.config = parseConfigfile(config)
File "/usr/local/lib/python2.7/dist-packages/TileStache/__init__.py", line 166, in parseConfigfile
return Config.buildConfiguration(config_dict, dirpath)
File "/usr/local/lib/python2.7/dist-packages/TileStache/Config.py", line 217, in buildConfiguration
config.layers[name] = _parseConfigfileLayer(layer_dict, config, dirpath)
File "/usr/local/lib/python2.7/dist-packages/TileStache/Config.py", line 441, in _parseConfigfileLayer
layer.provider = _class(layer, **provider_kwargs)
File "/usr/local/lib/python2.7/dist-packages/TileStache/Mapnik.py", line 81, in __init__
engine = mapnik.FontEngine.instance()
NameError: global name 'mapnik' is not defined
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 485, in spawn_worker
worker.init_process()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 100, in init_process
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 103, in wsgi
self.callable = self.load()
File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 25, in load
return util.import_app(self.app_uri)
File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 381, in import_app
app = eval(obj, mod.__dict__)
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/TileStache/__init__.py", line 373, in __init__
self.config = parseConfigfile(config)
File "/usr/local/lib/python2.7/dist-packages/TileStache/__init__.py", line 166, in parseConfigfile
return Config.buildConfiguration(config_dict, dirpath)
File "/usr/local/lib/python2.7/dist-packages/TileStache/Config.py", line 217, in buildConfiguration
config.layers[name] = _parseConfigfileLayer(layer_dict, config, dirpath)
File "/usr/local/lib/python2.7/dist-packages/TileStache/Config.py", line 441, in _parseConfigfileLayer
layer.provider = _class(layer, **provider_kwargs)
File "/usr/local/lib/python2.7/dist-packages/TileStache/Mapnik.py", line 81, in __init__
engine = mapnik.FontEngine.instance()
NameError: global name 'mapnik' is not defined
2013-03-30 23:02:41 [14305] [INFO] Worker exiting (pid: 14305)
2013-03-30 23:02:41 [14300] [INFO] Shutting down: Master
2013-03-30 23:02:41 [14300] [INFO] Reason: Worker failed to boot.
有谁知道这意味着什么?