我在 Redhat 上设置了 TileStache 服务器,从源代码安装 Mapnik 2.2。但是,Tilestache 给了我以下错误:
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/gevent/pywsgi.py", line 508, in handle_one_response
self.run_application()
File "/usr/lib64/python2.6/site-packages/gevent/pywsgi.py", line 494, in run_application
self.result = self.application(self.environ, self.start_response)
File "/usr/lib/python2.6/site-packages/TileStache/__init__.py", line 381, in __call__
status_code, headers, content = requestHandler2(self.config, path_info, query_string, script_name)
File "/usr/lib/python2.6/site-packages/TileStache/__init__.py", line 254, in requestHandler2
status_code, headers, content = layer.getTileResponse(coord, extension)
File "/usr/lib/python2.6/site-packages/TileStache/Core.py", line 414, in getTileResponse
tile = self.render(coord, format)
File "/usr/lib/python2.6/site-packages/TileStache/Core.py", line 500, in render
tile = provider.renderTile(width, height, srs, coord)
File "/usr/lib/python2.6/site-packages/TileStache/Goodies/Providers/MapnikGrid.py", line 72, in renderTile
self.mapnik = mapnik.Map(0, 0)
NameError: global name 'mapnik' is not defined
相关信息:
- 其他帖子建议将“import mapnik”更改为“import mapnik2 as mapnik”。但我得到了同样的错误信息。
- 在其他帖子中来自 TileStace/Mapnik.py,但我的来自 TileStache/Goodies/Providers/MapnikGrid.py。
- 相关文章:使用 WSGI 时 Gunicorn 失败
问题:
有谁知道这可能是什么原因造成的?提前致谢!