[Tilecache] mod_python and no TileCache.Service error

Xin xin at zenpow.com
Sun Mar 30 06:36:48 EDT 2008


I tried that before, then I get a no Caches error.

I've fixed this now. It's far from a perfect solution, but it works. I think
my Python environment is not setup right.

My apache config:
<Directory /var/www/tilecache/>
  PythonPath "['/var/www/tilecache/']+sys.path"
  AddHandler python-program .py
  PythonHandler TileCache.Service
  PythonOption TileCacheConfig /var/www/myapp/current/config/tilecache.cfg
  PythonDebug On
</Directory>

LoadModule python_module /usr/lib/apache2/modules/mod_python.so
# a hack to load mapnik library
LoadFile /usr/local/lib/libmapnik.so.0.5

Cheers,
Xin


On 28/03/2008, Frank Porcelli <fporcelli at taic.net> wrote:
>
>  Xin –
>
>
>
> Change "TileCache.Service" to "TileCache/Service" in your apache config
> and it should work.
>
>
>
> Frank
>
>
>  ------------------------------
>
> *From:* tilecache-bounces at openlayers.org [mailto:
> tilecache-bounces at openlayers.org] *On Behalf Of *Xin
> *Sent:* Friday, March 28, 2008 3:07 PM
> *To:* tilecache at openlayers.org
> *Subject:* [Tilecache] mod_python and no TileCache.Service error
>
>
>
> I am trying to get TileCache to work using mod_python. I get this error
> with my configuration:
>
> Phase:          'PythonHandler'
> Handler:        'TileCache.Service'
>
> ImportError: No module named TileCache.Service
>
> TileCache is located in /var/www/tilecache.
>
> ls /var/www/tilecache/
> docs         setup.py  TileCache      tilecache.cgi       tilecache.fcgi
>             tilecache_install_config.py
> ez_setup.py  tests     tilecache.cfg
>   tilecache_clean.py  tilecache_http_server.py  tilecache_seed.p
>
> My apache2 config:
> # Tilecache configuration
> <Directory /var/www/tilecache/>
>   AddHandler python-program .py
>   PythonHandler TileCache.Service
>   PythonOption TileCacheConfig /var/www/myapp/config/tilecache.cfg
>   PythonDebug On
> </Directory>
>
> Alias /tilecache/ "/var/www/tilecache/"
> <Directory "/var/www/tilecache">
>   AllowOverride None
>   Options Indexes FollowSymLinks Multiviews
>   Order allow,deny
>   Allow from all
> </Directory>
>
> http://www.nabble.com/Problem-with-TileCache-installation-td12671985.htmlis some hints, but it didn't solve my problem. When I changed  PythonHandler
> TileCache.Service to   PythonHandler TileCache/Service, I got no Caches
> module error.
>
> Why can't it find the modules? do I need to set some environmental
> variable?
>
> Thanks for any help
>
> Xin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20080330/34192414/attachment.html


More information about the Tilecache mailing list