[Tilecache] Mod python+ Apache + tilecache 2.04 No map display
Guillaume Sueur
guillaume.sueur at neogeo-online.net
Fri Jul 18 06:24:23 EDT 2008
is tilecache2 available in writing for the user who runs tilecache
(apache maybe) ?
Xiaoyu Guan a écrit :
> Dea all
>
> I am sure , my computer can access
> http://labs.metacarta.com/wms/vmap0
>
> my tilecache.cfg is default one,
> I only have changed this section
>
> [cache]
> type=DiskCache
> base= c:\tilecache2
>
> I have one question, do i need run setup.py in terminal? what s that for ?
> I saw some tutorials which do not mention this setp?
>
> Thanks in advance
>
> Xiaoyu
>
> On Fri, Jul 18, 2008 at 12:02 PM, Guillaume Sueur
> <guillaume.sueur at neogeo-online.net
> <mailto:guillaume.sueur at neogeo-online.net>> wrote:
>
> seems like the tilecache layer you are trying to generate is
> mis-configured. See the URLError(err). Check your tilecache.cfg, and
> your http access to the wms layers set into it.
>
> Guillaume
>
> Xiaoyu Guan a écrit :
>
> Hi Tibor:
> Thanks for your advise.
> as you mentioned, I just try the two link
>
> from http://127.0.0.1/tilecache/tilecache.py/1.0.0/
> I got xml codes like this
>
> <TileMapService version="1.0.0">
> −
> <TileMaps>
> <TileMap
> href="http://127.0.0.1/tilecache/tilecache.py/1.0.0/basic/"
> srs="EPSG:4326" title="basic" profile="global-geodetic"/>
> </TileMaps>
> </TileMapService>
>
> However, I got error when I open next link
>
> An error occurred: <urlopen error (10060, 'Operation timed out')>
> File
> "c:\python25\lib\site-packages\TileCache-2.04-py2.5.egg\TileCache\Service.py",
> line 224, in modPythonHandler
>
> host )
> File
> "c:\python25\lib\site-packages\TileCache-2.04-py2.5.egg\TileCache\Service.py",
> line 208, in dispatchRequest
> return self.renderTile(tile, params.has_key('FORCE'))
> File
> "c:\python25\lib\site-packages\TileCache-2.04-py2.5.egg\TileCache\Service.py",
> line 138, in renderTile
>
> data = layer.render(tile)
> File
> "c:\python25\lib\site-packages\TileCache-2.04-py2.5.egg\TileCache\Layer.py",
> line 437, in render
> return self.renderTile(tile)
> File
> "c:\python25\lib\site-packages\TileCache-2.04-py2.5.egg\TileCache\Layers\WMS.py",
> line 29, in renderTile
>
> tile.data, response = wms.fetch()
> File
> "c:\python25\lib\site-packages\TileCache-2.04-py2.5.egg\TileCache\Client.py",
> line 54, in fetch
> response = self.client.open(urlrequest)
> File "C:\Python25\lib\urllib2.py", line 374, in open
>
> response = self._open(req, data)
> File "C:\Python25\lib\urllib2.py", line 392, in _open
> '_open', req)
> File "C:\Python25\lib\urllib2.py", line 353, in _call_chain
> result = func(*args)
>
> File "C:\Python25\lib\urllib2.py", line 1101, in http_open
> return self.do_open(httplib.HTTPConnection, req)
> File "C:\Python25\lib\urllib2.py", line 1076, in do_open
> raise URLError(err)
>
>
> Seem like the egg, doesnt work
>
> All the best
>
> Xiaoyu
>
> On Fri, Jul 18, 2008 at 11:34 AM, Tibor Arpas
> <tibor.arpas at infinit.sk <mailto:tibor.arpas at infinit.sk>
> <mailto:tibor.arpas at infinit.sk <mailto:tibor.arpas at infinit.sk>>>
> wrote:
>
> Hi,
> I cannot really comment on your installation. But regarding
> the point 4.
> What would you expect after opening
> http://127.0.0.1/tilecache/tilecache.py ?The XML looks like
> everything is working fine. Did you try
> http://127.0.0.1/tilecache/tilecache.py/1.0.0/ ? And
> http://127.0.0.1/tilecache/tilecache.py/1.0.0/basic/0/0/0.png ?
> If that would work, your Tilecache installation is fine.
>
> Tibor
>
> On Fri, Jul 18, 2008 at 11:16 AM, Xiaoyu Guan
> <guanxiaoyu at gmail.com <mailto:guanxiaoyu at gmail.com>
> <mailto:guanxiaoyu at gmail.com <mailto:guanxiaoyu at gmail.com>>>
> wrote:
>
> Dear all
> I have setup Mod python with Apache 2.2 (Python 2.5) .
> from the
> test page, I am sure mod python it works
> then I try to setup TileCache 2.04
> after download setuptools-0.6c8-py2.5.egg
> At first, I copy Tilecache 2.04 to /Apache2.2/cgi-bin/, use
> terminal run setup.py, seem like nothing works, then I
> copy all
> the file to /Apache2.2/htdocs/tilecache , run setup.py again.
>
> according to some tutorials online, I have configured my
> Apache
> like this:
>
> 1. Add
> <Directory "C:/Program Files/Apache Software
> Foundation/Apache2.2/htdocs/tilecache">
> AddHandler python-program .py
> PythonHandler TileCache.Service
> PythonOption TileCacheConfig "C:/Program Files/Apache
> Software Foundation/Apache2.2/htdocs/tilecache/tilecache.cfg"
> PythonPath "['c:\Program Files\Apache Software
> Foundation\Apache2.2\htdocs\tilecache'] + sys.path"
> PythonDebug On
> </Directory>
>
> to Apache httpd.conf, restart apache, no error
> beside that tilecache.cfg modified like this
>
> [cache]
> type=DiskCache
> base= c:\tilecache2
>
> 2. Change some python script header to
> #!C:/Python25/python.exe -u
>
> 3. I changed tilecache.cgi into tilecache.py (under
> /Apache2.2/htdocs/tilecache/)index.html openlayers script
> like this
> var map, layer;
>
> function init(){
> map = new OpenLayers.Map( $('map'),
> {'maxResolution': 360/512});
> layer = new OpenLayers.Layer.WMS( "VMap0",
> "/tilecache/tilecache.py?", {layers:
> 'basic', format: 'image/png' } );
> map.addLayer(layer);
> map.addControl(new
> OpenLayers.Control.Permalink());
> if (!map.getCenter()) map.zoomToMaxExtent();
> }
>
> 4. when I open http://127.0.0.1/tilecache/tilecache.py
> without
> error message, but follow xml codes
> <?xml version="1.0" encoding="UTF-8" ?>
> - <#11b3584e60caad20_11b3574d15372b4f_> <Services>
>
> <TileMapService version="*1.0.0*"
> href="*http://127.0.0.1/1.0.0/*" />
> </Services>
>
>
>
> now I could not find where error is ? is there anybody
> have same
> problems before ?
> Thanks in advance
>
> All the best
> -- Xiaoyu Guan (Sam)
> Geo-information Science
> Wageningen UR
>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> <mailto:Tilecache at openlayers.org>
> <mailto:Tilecache at openlayers.org <mailto:Tilecache at openlayers.org>>
>
> http://openlayers.org/mailman/listinfo/tilecache
>
>
>
>
>
> --
> Xiaoyu Guan (Sam)
> Geo-information Science
> Wageningen UR
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org <mailto:Tilecache at openlayers.org>
> http://openlayers.org/mailman/listinfo/tilecache
>
>
> --
>
>
>
>
>
> --
> Xiaoyu Guan (Sam)
> Geo-information Science
> Wageningen UR
--
Guillaume SUEUR
Expert SIG et OpenSource
NEOGEO
46 RUE MATABIAU
31000 TOULOUSE
06 74 91 95 20
Site web : http://www.neogeo-online.net
More information about the Tilecache
mailing list