I was settling down to my lunchtime RSS trawl when to my horror I found no entries. Going into the PyDS Aggregator configuration I found that all my feeds had failed to download. I got a stack trace out of it which said:
There was an error when downloading the feed
Exception "exceptions.AttributeError: 'NoneType' object has no attribute 'lower'"
/usr/lib/python2.3/site-packages/PyDS/AggregatorTool.py[1560] in updateFeed
/usr/lib/python2.3/site-packages/PyDS/DownstreamTool.py[551] in download
/usr/lib/python2.3/site-packages/PyDS/DownstreamTool.py[364] in _download
/usr/lib/python2.3/urllib.py[181] in open
/usr/lib/python2.3/site-packages/PyDS/DownstreamTool.py[80] in open_http
/usr/lib/python2.3/urllib.py[269] in open_http
I think this one is caused by an incompatability between PyDS 0.7.2 and the version of urllib.py in Python 2.3.3. The function urllib.URLOpener.open_http seems to have changed a lot and it has broken the derived version in DownstreamTool.UrlOpener.open_http.
The quick fix for me was to rename DownstreamTool.UrlOpener.open_http to hide_open_http so that the version in urllib would be used. This worked and I now have 125 items to read.
This fix is obviously a hack, it'll only work for urls that start with 'http' (i.e. all mine), 'file' may still be broken. The proper fix would be to review the differences between the pyds version of UrlOpener and the new urllib version but that is beyond me as I don't even know why pyds has it's own urlopener.
Again it's my fault for using Gentoo and not using PyDS with the 'approved' versions of other libraries.
|