[Tilecache] TileCache.Cache import DiskCache
James McManus
jmpmcmanus at yahoo.com
Tue Jan 15 23:38:36 EST 2008
Christopher Schmidt wrote:
> On Tue, Jan 15, 2008 at 06:55:10PM -0800, James McManus McManus wrote:
>
>> Hi - I am trying to create a python script use Example.py in the doc directory. However, when I try to import DiskCache, I get the following error message:
>>
>>
>>>>> from TileCache.Cache import DiskCache
>>>>>
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> ImportError: cannot import name DiskCache
>>
>> I can import all other modules in the example. Does DiskCache still exist? I could not find any reference to it in the code.
>>
>
> Sorry -- the Cache got renamed "Disk". I'll fix the example. Fixed,
> r249, will be in the next release.
>
> Regards,
>
Christopher,
I tried that but thought it was incorrect because I got the following error:
>>> from TileCache.Service import Service, modPythonHandler, cgiHandler
>>> from TileCache.Caches import Disk
>>> import TileCache.Layers.MapServer as MS
>>> myService = Service (Disk("/var/www/html/mapdata/tmp"),{"basemap" :
MS.MapServer( "basemap", "/var/www/html/mapdata/Durham.map" )})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable
Am I using the correct sequence?
Thanks
Jim
More information about the Tilecache
mailing list