20 Aug 2007 tonyyarusso   » (Apprentice)

For a long time I have been frustrated by the fact that Supybot’s RSS plugin only supported RSS feeds, and not ATOM as well, as some of my friends’ blogs only offer the ATOM format. I did some Googling, and discovered a workaround involving substituting feedparser for rssparser in the plugin.py. However, I now have a new error, which there is a fair bit of mention about on the internet, but little in the way of solutions. It seems to affect anything python-related (MoinMoin, Supybot, Plone, etc.), and involves the translation of ASCII and UTF-8 character encodings. As I’m not very knowledgeable in this area, I would very much appreciated whatever information and/or fixes you can offer. Here’s my log output:

INFO 2007-08-20T01:52:19 rss planetubuntu called by
“tonyyarusso!n=anthony@ubuntu/member/tonyyarusso”.
ERROR 2007-08-20T01:52:19 Uncaught exception in [’rss’, ‘planetubuntu’].
Traceback (most recent call last):
File “/var/lib/python-support/python2.5/supybot/callbacks.py”, line 1170, in _callCommand
self.callCommand(command, irc, msg, *args, **kwargs)
File “/var/lib/python-support/python2.5/supybot/utils/python.py”, line 62, in g
f(self, *args, **kwargs)
File “/var/lib/python-support/python2.5/supybot/callbacks.py”, line 1156, in callCommand
method(irc, msg, *args, **kwargs)
File “/var/lib/python-support/python2.5/supybot/plugins/RSS/plugin.py”, line 294, in f
self.rss(irc, msg, args)
File “/var/lib/python-support/python2.5/supybot/commands.py”, line 906, in newf
f(self, irc, msg, args, *state.args, **state.kwargs)
File “/var/lib/python-support/python2.5/supybot/plugins/RSS/plugin.py”, line 383, in rss
headlines = self.buildHeadlines(headlines, channel, ’showLinks’)
File “/var/lib/python-support/python2.5/supybot/plugins/RSS/plugin.py”, line 142, in buildHeadlines
newheadlines.append(format(’%s %u’, *headline))
File “/var/lib/python-support/python2.5/supybot/utils/str.py”, line 430, in format
return _formatRe.sub(sub, s)
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 21: ordinal not in range(128)
ERROR 2007-08-20T01:52:19 Exception id: 0xe9e69

(Note: this is using http://planet.ubuntu.com/rss20.xml as the feed URL, and worked with the old rssparser. A number of other feeds are affected as well, including the individual site feeds of Hobbsee, ryanakca, johnc4510, jnthnjng, and LaserJock.)

Share This

#

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!