[MapProxy] Re: Deploy MapProxy with isapi-wsgi

Jorge Gaspar Sanz Salinas jsanz at osgeo.org
Fri Mar 18 04:21:53 EDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

El 17/03/2011 12:20, Jorge Gaspar Sanz Salinas escribió:
> El 17/03/2011 11:54, Oliver Tonnhofer escribió:
> 
>> On 17.03.2011, at 11:03, Jorge Gaspar Sanz Salinas wrote:
>>>> The deployment of MapProxy shouldn't be that different than from TileCache, they are both Python applications. Or do you just use CGI? That is easier to setup, but much slower. 
>>>
>>> we're setting up tilecache as a cgi associating .py requests to the
>>> executable, I know it's not the fastest way to deploy it, indeed.
>>>
>>> the cgi setup of mapproxy wasn't possible because some missing library
>>> (eunuchs?) so I'm trying the ISAPI-WSGI way, we have not surrended :-)
> 
>> The startup time of MapProxy is larger (more features, more code, longer startup), and so it is really not recommended to run MapProxy as CGI.
> 
> 
>>>> If you have any additions to the documentation
>>>>
>>>> .. and you are familiar with mercurial/hg then you could just fork the documentation form http://bitbucket.org/olt/mapproxy, change the docs and make a pull request,
>>>>
>>>> .. or you could just update a file from https://bitbucket.org/olt/mapproxy/src/default/doc/ and mail it to me.
>>>>
>>>
>>> probably the second one, I write restructuredtext everyday but I'm not
>>> familiar with mercurial
> 
> 
>> Yes, whatever works for you. I'm glad for any contribution.
> 
>> Regards,
>> Oliver
> 
> 
> Oliver thanks for your patience, I'm learning a few things regarding
> python these days :-)
> 
> OK we've downgraded to PIL 1.1.6, this is my easy_isntall.pth file
> 
> import sys; sys.__plen = len(sys.path)
> ./mapproxy-1.0.0-py2.6.egg
> ./pastescript-1.7.3-py2.6.egg
> ./pastedeploy-1.3.4-py2.6.egg
> ./paste-1.7.5.1-py2.6.egg
> ./pyproj-1.8.9-py2.6-win32.egg
> ./isapi_wsgi-0.4.2-py2.6-win32.egg
> ./pil-1.1.6-py2.6-win32.egg
> ./pyyaml-3.09-py2.6-win32.egg
> import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:];
> p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert =
> p+len(new)
> 
> 
> There's a tool to see what's going on for Windows called win32traceutil
> so now I can see the complete trace of 500 errors
> 
> c:\Python26\Lib\site-packages>python win32\lib\win32traceutil.py
> Collecting Python Trace Output...
> Internal Extension Error: Failed to import callback module 'isapi_mapproxy'
> Last Windows error: No hay mßs archivos.
> Traceback (most recent call last):
>   File "c:\Python26\Lib\site-packages\isapi_mapproxy.py", line 13, in
> <module>
>     application = loadapp('config:config.ini',
> relative_to="c:\\gis\\mapproxy\\apvmapproxy\\etc")
>   File
> "C:\Python26\lib\site-packages\pastedeploy-1.3.4-py2.6.egg\paste\deploy\loadwsgi.py",
> line 203, in loadapp
>     return loadobj(APP, uri, name=name, **kw)
>   File
> "C:\Python26\lib\site-packages\pastedeploy-1.3.4-py2.6.egg\paste\deploy\loadwsgi.py",
> line 223, in loadobj
>     global_conf=global_conf)
>   File
> "C:\Python26\lib\site-packages\pastedeploy-1.3.4-py2.6.egg\paste\deploy\loadwsgi.py",
> line 247, in loadcontext
>     global_conf=global_conf)
>   File
> "C:\Python26\lib\site-packages\pastedeploy-1.3.4-py2.6.egg\paste\deploy\loadwsgi.py",
> line 270, in _loadconfig
>     return loader.get_context(object_type, name, global_conf)
>   File
> "C:\Python26\lib\site-packages\pastedeploy-1.3.4-py2.6.egg\paste\deploy\loadwsgi.py",
> line 401, in get_context
>     section)
>   File
> "C:\Python26\lib\site-packages\pastedeploy-1.3.4-py2.6.egg\paste\deploy\loadwsgi.py",
> line 423, in _context_from_use
>     object_type, name=use, global_conf=global_conf)
>   File
> "C:\Python26\lib\site-packages\pastedeploy-1.3.4-py2.6.egg\paste\deploy\loadwsgi.py",
> line 353, in get_context
>     global_conf=global_conf)
>   File
> "C:\Python26\lib\site-packages\pastedeploy-1.3.4-py2.6.egg\paste\deploy\loadwsgi.py",
> line 247, in loadcontext
>     global_conf=global_conf)
>   File
> "C:\Python26\lib\site-packages\pastedeploy-1.3.4-py2.6.egg\paste\deploy\loadwsgi.py",
> line 277, in _loadegg
>     return loader.get_context(object_type, name, global_conf)
>   File
> "C:\Python26\lib\site-packages\pastedeploy-1.3.4-py2.6.egg\paste\deploy\loadwsgi.py",
> line 553, in get_context
>     object_type, name=name)
>   File
> "C:\Python26\lib\site-packages\pastedeploy-1.3.4-py2.6.egg\paste\deploy\loadwsgi.py",
> line 573, in find_egg_entry_point
>     pkg_resources.require(self.spec)
>   File "c:\Python26\Lib\site-packages\pkg_resources.py", line 666, in
> require
>     needed = self.resolve(parse_requirements(requirements))
>   File "c:\Python26\Lib\site-packages\pkg_resources.py", line 565, in
> resolve
>     raise DistributionNotFound(req)  # XXX put more info here
> pkg_resources.DistributionNotFound: PyYAML>=3.0,<3.99
> 
> It seems something with PyYAML but if I open a python console I can
> import yaml without any problem (for example using yaml.dump({''name':"me"})
> 
> It seems I haven't learned enough anyway :-S
> 


OK we have almost been able to configure MapProxy with IIS and
ISAPI-WSGI, it seems there's something weird with permissions and user
roles.

A workmate is working on it, so when we have a clean procedure to
install MapProxy on this technological configuration we will post here
the results for the records.

Thank you Oliver for your advices

- -- 
Jorge Gaspar Sanz Salinas
http://es.osgeo.org
http://jorgesanz.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNgxYfAAoJEAOYD75lvHdBlBEH/12c4BtME7oDSLPyjGjyDeen
AL/gqRVKe0jxD2bXQvWg59SibYsDFDNMkLdf+bnwPzf4YFxnNi+TczLYDgE2qmGB
bQZ0JIAfdnSfWrackW67ojm0ihXEQk1a1LNE53HCr7TnJ/tpuwnpn/GLFdhj0dy5
4o/zwLRUyETVnKTf5rhZQ4QWC51YJU8gcjMKBtAhPWrHUFFHL05X8ORAkqGqSyFN
/LmwasyxKfSUHZzG1k9RgtjfNB21vvB0GFMYm/hpWY2XGVuIQEf+TF/UyFjvHWq2
QZtGRhXDyhGskA/T35iDo0ymuOtu6zHTex93/gZ8l2XDsTOEtTKnKv5KS4z1ulo=
=ULae
-----END PGP SIGNATURE-----


More information about the MapProxy mailing list