[OpenLayers-Users] TileCache and error "Zero length data returned from layer"

Duarte Carreira DCarreira at edia.pt
Fri Dec 22 08:12:29 EST 2006


I'm responding to myself - maybe this will help someone else. 

Tilecache wasn't working even for localhost mapservices or intranet.

After reading the Tile Map Service Specification, I read the notice
stating IIS does not conform to the CGI specification regarding
path_info. So I followed the instructions to set this up given on the MS
link (http://support.microsoft.com/kb/q184320/).

After this, the error did not occur if the mapservice was on the
Intranet. But I was getting no images in my map...

After digging a bit more, I looked at the generated source in Firefox,
and all images were being styled with 'display: none' and had a
"src=tilecache.py?......" without the complete url (localhost/....).
I edited the test page pointing the layer to a complete url, and finally
got tilecache working.

Another solution was using this line from the demo on
http://labs.metacarta.com/wms-c/demo.html:

OpenLayers.Tile.Image.prototype = OpenLayers.Class.inherit(
OpenLayers.Tile.Image, { checkImgURL: function() {} });

Now, everything works only on intranet mapservices, and every attempt to
use external mapservices resulted in the same zero length error.
I'm on an ISA server lan, so I'm guessing there's a problem there. I saw
many references to this issue on the net but could not figure out a
solution other than installing the latest python 2.5 which didn't help.
I may be wrong about the root of the problem being ISA Server/proxy, so
if anyone else has an ideia about this I'd be happy to hear about it.

Thanks.
Duarte Carreira



-----Mensagem original-----
----------------------------------------------------------------------
Date: Tue, 12 Dec 2006 19:38:47 -0000
From: "Duarte Carreira" <DCarreira at edia.pt>
Subject: [OpenLayers-Users] TileCache and error "Zero length data
	returned	from layer"
To: <users at openlayers.org>
Message-ID: <94C0F903807262438796839A98A9BA50015151BA at beja001.edia.pt>
Content-Type: text/plain; charset="us-ascii"

I'm trying to setup TileCache under Windows + Python 2.4 + IIS 5.1 +
CGI.
 
I can get a python test page to work ok.
 
I use the default configuration pointing to metacarta's vmap0 wms
service.
 
Then I try the example url:
http://localhost/tilecache/tilecache.cgi?LAYERS=basic&SERVICE=WMS&VERSIO
N=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&BBOX=-180,-90,0,90&WIDTH=256&HEIGHT
=256
<http://localhost/tilecache/tilecache.cgi?LAYERS=basic&SERVICE=WMS&VERSI
ON=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&BBOX=-180,-90,0,90&WIDTH=256&HEIGH
T=256> 

And I get the following error:

An error occurred: Zero length data returned from layer.
  File "C:\wms\tilecache-1.3\TileCache\Service.py", line 427, in
cgiHandler
    format, image = service.dispatchRequest( params, path_info, host )

  File "C:\wms\tilecache-1.3\TileCache\Service.py", line 383, in
dispatchRequest
    return self.renderTile(tile, params.has_key('FORCE'))

  File "C:\wms\tilecache-1.3\TileCache\Service.py", line 362, in
renderTile
    else: raise Exception("Zero length data returned from layer.")

I have seen another message in the lists pointing the same error and it
seems the culprit is urllib2.

Is there a solution to this problem? Some additional configuration
needed? Is there anyone running the same configuration successfully?

Thanks,

Duarte




More information about the Users mailing list