我正在将mapserver系统从32位移到64位Windows(多个python安装带来了太多的挫折)。64位没有简单的MS4W安装。我使用的是GISInternals的Apache2.4和64位mapserver。我添加了mapser.exe文件文件到Apache的cgi-bin文件夹,但我不确定是否需要其他更改来匹配MS4W设置。尝试打开包含映射文件的页面时,我在Apache错误日志中看到以下内容:
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] Internal Server Error: /mapit/mapYr/luz_mapfile_scen1_yr_160525_070507
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] Traceback (most recent call last):
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\base.py", line 149, in get_response
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] response = self.process_exception_by_middleware(e, request)
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\base.py", line 147, in get_response
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] File "C:/MapItApplication\\web_output\\mapit\\views.py", line 1132, in view_mapYr
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] wms = WebMapService(mapServerUrl, version='1.1.1')
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] File "C:\\Python27\\lib\\site-packages\\owslib\\wms.py", line 85, in __init__
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] self._capabilities = reader.read(self.url, timeout=self.timeout)
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] File "C:\\Python27\\lib\\site-packages\\owslib\\wms.py", line 700, in read
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] return etree.fromstring(u.read())
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] File "C:\\Python27\\Lib\\xml\\etree\\ElementTree.py", line 1300, in XML
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] parser.feed(text)
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] File "C:\\Python27\\Lib\\xml\\etree\\ElementTree.py", line 1642, in feed
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] self._raiseerror(v)
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] File "C:\\Python27\\Lib\\xml\\etree\\ElementTree.py", line 1506, in _raiseerror
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] raise err
[Wed May 25 07:14:18.838731 2016] [wsgi:error] [pid 3432:tid 1080] ParseError: syntax error: line 1, column 49
[Wed May 25 07:14:49.944510 2016] [cgi:error] [pid 3432:tid 1080] [client *removed for posting*] End of script output before headers: mapserv.exe
http配置文件(已更新):
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias /mapit C:/MapItApplication/web_output/apache/mapit_django.wsgi
<Directory "C:/MapItApplication/web_output/apache">
AllowOverride None
Options Indexes MultiViews Includes FollowSymLinks
Require all granted
</Directory>
##
Alias /mapimages "C:/MapItApplication/web_output/images"
<Directory "C:/MapItApplication/web_output/images">
AllowOverride None
Options Indexes MultiViews Includes FollowSymLinks
Require all granted
</Directory>
我在下面:http://www.onegeology.org/wmsCookbook/4_4_3.html
更新: 解析错误似乎是由于python试图解析错误页而导致的误称。错误是“在头之前结束脚本输出:mapserv.exe文件““
目前没有回答
相关问题 更多 >
编程相关推荐