[Tilecache] Help with tilecache.cgi unusual error

Fredrik Lundh fredrik at pythonware.com
Mon May 5 14:09:27 EDT 2008


>  I hope someone with more python experience then I might be able to shed some
>  like on this:
>
>  I have tilecache successfully running as a CGI on about 3 servers (Linux) on
>  the latest attempt I'm getting an error I've never seen before. Through
>  apache I just get a 500 server error

with a little luck, the exact error will be logged to an error log
(usally called error_log or something similar).

if that doesn't help, try adding

   import cgitb; cgitb.enable()

to the top of the CGI script, and load up the problematic URL with a
web browser.

for more on this module, see:

   http://docs.python.org/lib/module-cgitb.html

> but here is what I get via the command line:

>  An error occurred: 'SCRIPT_NAME'
>   File "/httpdocs/TileCache/Service.py", line 262, in cgiHandler
>     host += os.environ["SCRIPT_NAME"]
>   File "/usr/lib/python2.3/UserDict.py", line 19, in __getitem__
>     def __getitem__(self, key): return self.data[key]

that's the expected behaviour -- there's no CGI context available when
you run the cgi script from the command line.

</F>



More information about the Tilecache mailing list