[Tilecache] Mod python+ Apache + tilecache 2.04 No map display

Xiaoyu Guan guanxiaoyu at gmail.com
Fri Jul 18 10:07:41 EDT 2008


Thanks Christopher

firstly, I just type this lines in IDLE . then nothing happens, it stuck
there

then I put the script which you sent to me into a test python file

when I open the file (http://127.0.0.1/test/mptest.py) I do get some error
message,

URI:            '/test/mptest.py'
Location:       None
Directory:      'C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/test/'
Filename:       'C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/test/mptest.py'
PathInfo:       ''

Phase:          'PythonHandler'
Handler:        'mptest'

Traceback (most recent call last):

  File "C:\Python25\lib\site-packages\mod_python\importer.py", line
1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "C:\Python25\lib\site-packages\mod_python\importer.py", line
1202, in _process_target
    module = import_module(module_name, path=path)

  File "C:\Python25\lib\site-packages\mod_python\importer.py", line
296, in import_module
    log, import_path)

  File "C:\Python25\lib\site-packages\mod_python\importer.py", line
680, in import_module
    execfile(file, module.__dict__)

  File "C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\test\mptest.py", line 2, in <module>
    urllib.urlopen('http://labs.metacarta.com/wms/vmap0').read()

  File "C:\Python25\lib\urllib.py", line 82, in urlopen
    return opener.open(url)

  File "C:\Python25\lib\urllib.py", line 190, in open
    return getattr(self, name)(url)

  File "C:\Python25\lib\urllib.py", line 325, in open_http
    h.endheaders()

  File "C:\Python25\lib\httplib.py", line 856, in endheaders
    self._send_output()

  File "C:\Python25\lib\httplib.py", line 728, in _send_output
    self.send(msg)

  File "C:\Python25\lib\httplib.py", line 695, in send
    self.connect()

  File "C:\Python25\lib\httplib.py", line 679, in connect
    raise socket.error, msg

IOError: [Errno socket error] (10060, 'Operation timed out')


MODULE CACHE DETAILS

Accessed:       Fri Jul 18 15:51:23 2008
Generation:     0

_mp_4dc1c0c8307510ff7d0d209757080772 {
  FileName:     'C:\\Program Files\\Apache Software
Foundation\\Apache2.2\\htdocs\\test\\mptest.py'
  Instance:     1 [IMPORT]
  Generation:   0 [ERROR]
  Modified:     Fri Jul 18 15:51:09 2008
}



is that means I have to looking for a suitable mod_python ?
on the anther way, without mod_python, I just copy all file into
/apache/cgi-bin/

when I open the link
http://127.0.0.1/cgi-bin/tilecache-2.04/tilecache.cgi/1.0.0/basic/0/0/0.png
I have same error with mod_python

An error occurred: <urlopen error (10060, 'Operation timed out')>
  File "C:\Program Files\Apache Software
Foundation\Apache2.2\cgi-bin\tilecache-2.04\TileCache\Service.py",
line 290, in cgiHandler
    format, image = service.dispatchRequest( params, path_info,
req_method, host )
  File "C:\Program Files\Apache Software
Foundation\Apache2.2\cgi-bin\tilecache-2.04\TileCache\Service.py",
line 208, in dispatchRequest
    return self.renderTile(tile, params.has_key('FORCE'))
  File "C:\Program Files\Apache Software
Foundation\Apache2.2\cgi-bin\tilecache-2.04\TileCache\Service.py",
line 138, in renderTile
    data = layer.render(tile)
  File "C:\Program Files\Apache Software
Foundation\Apache2.2\cgi-bin\tilecache-2.04\TileCache\Layer.py", line
437, in render
    return self.renderTile(tile)
  File "C:\Program Files\Apache Software
Foundation\Apache2.2\cgi-bin\tilecache-2.04\TileCache\Layers\WMS.py",
line 29, in renderTile
    tile.data, response = wms.fetch()
  File "C:\Program Files\Apache Software
Foundation\Apache2.2\cgi-bin\tilecache-2.04\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)

I am wondering whether there is any  packages that combine Apache +
mod_python + tilecache?

Thanks

Xiaoyu



On Fri, Jul 18, 2008 at 3:41 PM, Christopher Schmidt <
crschmidt at metacarta.com> wrote:

> On Fri, Jul 18, 2008 at 11:45:19AM +0200, Xiaoyu Guan wrote:
> > 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">
> > ?$B!]
> > <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>
>
> This is expected.
>
> > However, I got error when I open next link
> >
> > An error occurred: <urlopen error (10060, 'Operation timed out')>
>
> This is not a TileCache problem.
>
> The problem is, specifically, that Python running within mod_python
> can't access to the URL that you have configured.
>
> This typically means that something about your configuration doesn't
> allow this type of access. Perhaps it's a firewall rule, or something
> else.
>
> You can try testing with a python command line: typing:
>
> import urllib
> urllib.urlopen('http://labs.metacarta.com/wms/vmap0').read(<http://labs.metacarta.com/wms/vmap0%27%29.read%28>
> )
>
> If you get the same error: great, fix that, then move on.
>
> Unfortunately, this usually doesn't happen: usually people come back and
> say 'it works on the command line, but not in TileCache.'
>
> At that point, it's a problem with your machine/mod_python, which I
> don't know how to solve.
>
> However, it's not a TileCache-specific bug, so you'd want to look for
> 'mod_python urllib timeout' in searches, rather than anything TileCache
> specific.
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
>



-- 
Xiaoyu Guan (Sam)
Geo-information Science
Wageningen UR
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20080718/43e6b8e3/attachment.html


More information about the Tilecache mailing list