[Tilecache] ImportError: No module named TileCache.Caches.Disk

Paul McCullough paul.mccullough at sfgov.org
Mon Mar 10 22:28:48 EDT 2008


All,

I think I am having an import problem - and I could really use some help.
It is similar to this issue:
    http://www.nabble.com/upgrading-to-2.x-td14575076.html#a14577719

Symptoms:
I get pink tiles.
When I right click-view image I see this:
==========================================
MOD_PYTHON ERROR

ProcessId:      25964
Interpreter:    'gis03v1.sfgov.org'

ServerName:     'gis03v1.sfgov.org'
DocumentRoot:   '/var/www/html'

URI:            '/TileCache-2.0/tilecache.py'
Location:       None
Directory:      '/var/www/html/TileCache-2.0/'
Filename:       '/var/www/html/TileCache-2.0/tilecache.py'
PathInfo:       ''

Phase:          'PythonHandler'
Handler:        'TileCache/Service'

Traceback (most recent call last):

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537,
in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229,
in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128,
in _execute_target
    result = object(arg)

  File "/var/www/html/TileCache-2.0/TileCache/Service.py", line 282, in
handler
    theService = Service.load(*cfgs)

  File "/var/www/html/TileCache-2.0/TileCache/Service.py", line 91, in _load
    cache = cls.loadFromSection(config, "cache", Cache)

  File "/var/www/html/TileCache-2.0/TileCache/Service.py", line 65, in
_loadFromSection
    object_module = import_module("TileCache.Caches.%s" % type)

  File "/var/www/html/TileCache-2.0/TileCache/Service.py", line 35, in
import_module
    mod = __import__(name)

ImportError: No module named TileCache.Caches.Disk


MODULE CACHE DETAILS

Accessed:       Mon Mar 10 19:11:20 2008
Generation:     40

_mp_7860e43e57a9553fc3fc66b2980bc486 {
  FileName:     '/var/www/html/TileCache-2.0/TileCache/Cache.py'
  Instance:     1
  Generation:   1
  Modified:     Mon Mar 10 18:33:11 2008
  Imported:     Mon Mar 10 19:08:33 2008
}

_mp_0efae84494389ed220280773eaaf367b {
  FileName:     '/var/www/html/TileCache-2.0/TileCache/Client.py'
  Instance:     1
  Generation:   2
  Modified:     Mon Mar 10 18:33:11 2008
  Imported:     Mon Mar 10 19:08:33 2008
}

_mp_5bcc3216b44121ca4323818176c471a0 {
  FileName:     '/var/www/html/TileCache-2.0/TileCache/Layer.py'
  Instance:     20 [RELOAD]
  Generation:   41
  Modified:     Mon Mar 10 18:33:11 2008
  Imported:     Mon Mar 10 19:11:20 2008
  Children:     '/var/www/html/TileCache-2.0/TileCache/Client.py',
                '/var/www/html/TileCache-2.0/TileCache/Service.py'
}

_mp_90d6c2e9d0b3ca75fc492a0f4dcfdd6a {
  FileName:     '/var/www/html/TileCache-2.0/TileCache/Service.py'
  Instance:     20 [RELOAD]
  Generation:   42
  Modified:     Mon Mar 10 18:33:11 2008
  Imported:     Mon Mar 10 19:11:20 2008
  Children:     '/var/www/html/TileCache-2.0/TileCache/Cache.py',
                '/var/www/html/TileCache-2.0/TileCache/Layer.py'
}
========================================================================




My tilecache.cfg is:
...
[cache]
type=Disk
base=/tmp/tilecache
# I have set rwx perms for all
...
[sfgis_map]
type=WMSLayer
layers=sfgis_map
url=http://10.1.15.68:8080/geoserver/wms?
bbox=-122.552,37.690,-122.337,37.853
srs=EPSG:4326
maxResolution=0.000244141
extension=jpg
extent_type=loose
metaTile=true



================================================================================



I have these lines in /etc/httpd/conf.d/python.conf.
...
LoadModule python_module modules/mod_python.so
...
<Directory /var/www/html/TileCache-2.0>
        AddHandler python-program .py
        PythonHandler TileCache/Service
        PythonOption TileCacheConfig
/var/www/html/TileCache-2.0/tilecache.cfg
        PythonDebug On
        PythonPath "[ '/var/www/html/TileCache-2.0/TileCache' ] + sys.path"
</Directory>

I have also tried adding those lines to /etc/httpd/conf/httpd.conf (same
results)

================================================================================


I am on 
 - fedora 8
 - tilecache 2.0
 

 Regards,
 Paul

-- 
View this message in context: http://www.nabble.com/ImportError%3A-No-module-named-TileCache.Caches.Disk-tp15973420p15973420.html
Sent from the TileCache mailing list archive at Nabble.com.




More information about the Tilecache mailing list