[Python-au] help debugging cacheability.py

David Lutz david at jadescape.com
Sat Jul 16 15:12:50 CEST 2005


Hello, I'm trying to get the cacheability script from 
http://www.mnot.net/cacheability/download.html working with python 2.3.4

It works fine with python 1.5.2

Here's two test URLs to demonstrate the problem:

http://www.microsoft.com/library/toolbar/3.0/images/banners/ms_masthead_ltr.gif

Traceback (most recent call last):
   File "./cacheability.py", line 994, in ?
     clui_main()
   File "./cacheability.py", line 961, in clui_main
     print f
   File "/var/www/cgi-bin/cacheability/spider.py", line 355, in __repr__
     p("  Cache-Control: %s" % (self._hdrs.get('cache-control', self.no_data)))
   File "/var/www/cgi-bin/cacheability/httpheadertypes.py", line 280, in 
__getattr__
     return self.__dict__[attr]
KeyError: '__str__'

http://www.google.com/intl/en/images/logo.gif
         Expires: Sun, 17 Jan 2038 19:14:07 GMT
   Cache-Control: -
   Last-Modified: Mon, 25 Apr 2005 21:06:18 GMT (validated)
            ETag: -
  Content-Length: 8558
          Server: GWS/2.1

I'm guessing that one of the headers that IIS is sending is breaking the 
script?   But not in an old version of python.

Any suggestions as to where I should be looking to fix it?
Thanks.  David.




More information about the python-au mailing list