Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was having tile generation problems with TileCache 2.11 and decided to update to the trunk. I repeated the instructions necessary to get TileCache working in IIS but now I'm seeing this error:

An error occurred: No section: 'cache'
  File "C:\inetpub\wwwroot\tilecache\TileCache\Configs\", line 147, in read
    self.cache = self._loadFromSection(config, "cache", TileCache.Cache)
  File "C:\inetpub\wwwroot\tilecache\TileCache\", line 74, in _loadFromSection
    type  = config.get(section, "type")
  File "C:\Python25\lib\", line 511, in get
    raise NoSectionError(section)

I've made the necessary change to

from TileCache import Service, cgiHandler, cfgfiles

if __name__ == '__main__':
    svc = Service.load("c:\\inetpub\\wwwroot\\tilecache\\tilecache.cfg")

And I've confirmed my configuration file exists and does contain a [cache] section:


Using SysInternals ProcessMonitor I've determined that python.exe never attempts to access tilecache.cfg.

Renaming tilecache.cfg results in the same error. Why isn't it loading the file? Is the path incorrectly formed?

share|improve this question
up vote 0 down vote accepted

It seems the solution is to put [brackets] around the path to the tilecache.cfg file:

So modify to look like this:

from TileCache import Service, cgiHandler, cfgfiles

if __name__ == '__main__':
    svc = Service.load(["d:\\code\\tilecache\\tilecache.cfg"])
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.