Package: rss2email Version: 1:2.54-2 Severity: normal Tags: patch I got the following exception today:
590:[EMAIL PROTECTED]: ~] r2e run === SEND THE FOLLOWING TO [EMAIL PROTECTED] === E: 'NoneType' object has no attribute 'read' http://barba.dat.escet.urjc.es:9080/libresoft/rdf10_xml {'feed': {}, 'encoding': 'utf-8', 'bozo': 1, 'version': None, 'entries': [], 'bozo_exception': <exceptions.AttributeError instance at 0x4086660c>} rss2email 2.54 feedparser 3.3 html2text 2.2 Python 2.3.5 (#2, May 4 2005, 08:51:39) [GCC 3.3.5 (Debian 1:3.3.5-12)] === END HERE === Saving the RSS file with wget resulted in: 863:[EMAIL PROTECTED]: ~] wget http://barba.dat.escet.urjc.es:9080/libresoft/rdf10_xml --10:09:40-- http://barba.dat.escet.urjc.es:9080/libresoft/rdf10_xml => `rdf10_xml' Resolving barba.dat.escet.urjc.es... 193.147.71.88 Connecting to barba.dat.escet.urjc.es[193.147.71.88]:9080... connected. HTTP request sent, awaiting response... End of file while parsing headers. Retrying. ... Further debugging shows that the web server allow you to connect but immediately drops the connection: 644:[EMAIL PROTECTED]: ~] telnet barba.dat.escet.urjc.es 9080 Trying 193.147.71.88... Connected to gsyc088.dat.escet.urjc.es. Escape character is '^]'. Connection closed by foreign host. zsh: exit 1 telnet barba.dat.escet.urjc.es 9080 645:[EMAIL PROTECTED]: ~] Basically, _open_resource() in feedparser.py tries to return opener.open(request) but this open fails because it cannot do a read(). The patch below catches this exception in rss2email and shows an error, but the error message is less than optimal... IMHO, this would be better handled directly in feedparser.py but I couldn't figure out a good way how. With this patch, you get: 1597:[EMAIL PROTECTED]: ~] r2e run W: 'NoneType' object has no attribute 'read' http://barba.dat.escet.urjc.es:9080/libresoft/rdf10_xml --- rss2email.py~ 2005-06-05 09:47:21.473405488 +0100 +++ rss2email.py 2005-06-05 10:02:48.399491304 +0100 @@ -328,6 +328,8 @@ exc_reason = r.bozo_exception.reason print >>warn, "W:", exc_reason, f.url + elif exc_type == AttributeError: + print >>warn, "W:", r.bozo_exception, f.url elif exc_type == KeyboardInterrupt: raise r.bozo_exception -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.10-1-686 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages rss2email depends on: ii python 2.3.5-2 An interactive high-level object-o -- no debconf information -- Martin Michlmayr http://www.cyrius.com/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

