[Tilecache] tilecache 2.01 - INSTALLING TILECACHE - RUNNING UNDER MOD_PYTHON

Pedro Mendes mendes at gaveta.net
Fri Feb 15 14:25:41 EST 2008


Hi,

I have tilecache-1.9 configured (running under mod_python) and working
sucessfully.

The tilecache-1.9 configuration:
  -- httpd.conf
    LoadModule python_module modules/mod_python.so
    Alias /tile/ "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/tilecache/"
    <Directory "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/tilecache" >
	 AddHandler python-program .py
	 PythonHandler Service 
	 PythonOption TileCacheConfig "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/tilecache/tilecache.cfg"
    </Directory>
  
  -- the service call using OpenLayers, putting URL
"http://localhost/tile/tilecache.py?"

This works great.

Now i´m trying the tilecache-2.01 distribution, but several problems rised
up. 
 the application is configured in the same server as following:
 -- httpd.conf
 Alias /tile2.01/ "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/tilecache-2.01/"
 <Directory "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/tilecache-2.01">
        AddHandler python-program .py
        PythonHandler TileCache/Service
        PythonOption TileCacheConfig "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/tilecache-2.01/tilecache.cfg"
        PythonDebug On
</Directory> 

My problems:

1. When i try to call the service, where is the tilecache.py (for url
"http://localhost/tile/tilecache.py?") ?  What will be the url to point OL
requests to tilecache? 
 
2. I added this file (tilecache.py) to tilecache directory but i get the
following when calling the service from OL with the same url:

MOD_PYTHON ERROR

ProcessId:      4796
Interpreter:    'localhost.olimpo.local'
ServerName:     'localhost.olimpo.local'
DocumentRoot:   'C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs'
URI:            '/tile2/tilecache.py'
Location:       None
Directory:      'C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/tilecache-2.01/'
Filename:       'C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/tilecache-2.01/tilecache.py'
PathInfo:       ''
Phase:          'PythonHandler'
Handler:        'TileCache/Service'
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\tilecache-2.01\TileCache\Service.py", line 8, in
<module>
    import Cache, Caches

ImportError: No module named Caches


MODULE CACHE DETAILS

Accessed:       Fri Feb 15 19:17:24 2008
Generation:     0

_mp_abb1e0137c7ea2b6d35339ef00428a4b {
  FileName:     'C:\\Program Files\\Apache Software
Foundation\\Apache2.2\\htdocs\\tilecache-2.01\\TileCache\\Cache.py'
  Instance:     1 [IMPORT]
  Generation:   1
  Modified:     Thu Dec 27 08:56:10 2007
  Imported:     Fri Feb 15 19:17:24 2008
}

_mp_c55d11862dc4545d7cb94346a2a87de4 {
  FileName:     'C:\\Program Files\\Apache Software
Foundation\\Apache2.2\\htdocs\\tilecache-2.01\\TileCache\\Service.py'
  Instance:     1 [IMPORT]
  Generation:   0 [ERROR]
  Modified:     Thu Dec 27 08:56:10 2007
  Children:     'C:\\Program Files\\Apache Software
Foundation\\Apache2.2\\htdocs\\tilecache-2.01\\TileCache\\Cache.py'
}

By the exception thrown i get the impression that maybe python isn´t being
capable of import the modules under the new directory tree of this
distribution. Or tilecache.py shouldn´t exist..well i don´t know i tried
using it.

my env:
windows xp sp2, apache 2.2, tilecache-1.9 (tilecache-2.01), python25,
geoserver 1.6.0

Thanks in advance.

Pedro Mendes

-- 
View this message in context: http://www.nabble.com/tilecache-2.01---INSTALLING-TILECACHE---RUNNING-UNDER-MOD_PYTHON-tp15508363p15508363.html
Sent from the TileCache mailing list archive at Nabble.com.




More information about the Tilecache mailing list