[Tilecache] tilecache_seed.py gives error

Christopher Schmidt crschmidt at metacarta.com
Thu Sep 18 11:44:58 EDT 2008


On Thu, Sep 18, 2008 at 08:30:44AM -0700, Huseyin Akyol wrote:
> 
> Hi,
> 
> I have tilecache 2.04 and it works fine, it can create tiles when i call
> cgi. But, when i want to create caches vie tilecache_seed.py it gives error.
> Python 2.5.2 is installed.
> 
> Here are my cfg file and errors of tilecache_seed.py,
> 
> cfg file;
> 
> [layername]
> type=WMS
> url=http://localhost/cgi-bin/mapserv.exe?map=D:\mapfile.map
> layers=layername
> extension=png
> resolutions=1.406250,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.000021457672119140625,0.0000107288360595703125,0.00000536441802978515625,0.000002682209014892578125
> bbox= 27.928018, 40.372458, 29.962443, 42.017497
> srs=EPSG:4326
> extent_type=loose
> 
> errors;
> 
> tilecache_seed.py "http://localhost/cgi-bin/tilecache.cgi?" layername 1 15
> "27.928018,40.372458,29.962443,42.017497"
> 
> Traceback (most recent call last):
>   File "C:\ms4w\Apache\cgi-bin\tilecache_seed.py", line 7, in ?
>     import TileCache.Client
>   File "C:\ms4w\Apache\cgi-bin\TileCache\__init__.py", line 2, in ?
>     from Cache import *
>   File "C:\ms4w\Apache\cgi-bin\TileCache\Cache.py", line 5, in ?
>     class Cache (object):
> NameError: name 'object' is not defined
> 
> 
> What can be the problem?

Looks to me like your Python is Very Old when you're running it on the
command line. I guess you're using Windows: can you paste the command
line you are using? If you're using something like
C:\Python2.5\python.exe, can you add a '-v' to it and see if it spits
out the version you expect? can you run the interpreter and try typing:

class Cache(object): pass

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Tilecache mailing list