progval / Limnoria

A robust, full-featured, and user/programmer-friendly Python IRC bot, with many existing plugins.
https://docs.limnoria.net/
Other
623 stars 173 forks source link

RSS config storage corrupts non-ASCII feed titles (since 2015.10.04) #1181

Open Mikaela opened 9 years ago

Mikaela commented 9 years ago

I see two kinds of errors in logs:

Exception in thread Thread-46242:
Traceback (most recent call last):
  File "/home/users/mikaela/.local/opt/python3/lib/python3.5/threading.py", line
 923, in _bootstrap_inner
    self.run()
  File "/home/users/mikaela/.local/opt/python3/lib/python3.5/threading.py", line
 871, in run
    self._target(*self._args, **self._kwargs)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/plugins/R
SS/plugin.py", line 74, in newf
    f(*args, **kwargs)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/plugins/R
SS/plugin.py", line 330, in update_feeds
    self.update_feed_if_needed(feed)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/plugins/R
SS/plugin.py", line 315, in update_feed_if_needed
    if self.is_expired(feed):
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/plugins/R
SS/plugin.py", line 282, in is_expired
    specific_period = self.registryValue('feeds.%s.waitPeriod' % feed.name)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/callbacks
.py", line 1350, in registryValue
    group = group.get(name)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/registry.
py", line 249, in get
    return self.__getattr__(attr)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/registry.
py", line 241, in __getattr__
    self.__nonExistentEntry(attr)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/registry.
py", line 221, in __nonExistentEntry
    raise NonExistentRegistryEntry(s)
supybot.registry.NonExistentRegistryEntry: 'elisahäiriö' is not a valid entry 
in 'supybot.plugins.RSS.feeds'
Exception in thread Thread-46255:
Traceback (most recent call last):
  File "/home/users/mikaela/.local/opt/python3/lib/python3.5/threading.py", line
 923, in _bootstrap_inner
    self.run()
  File "/home/users/mikaela/.local/opt/python3/lib/python3.5/threading.py", line
 871, in run
    self._target(*self._args, **self._kwargs)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/plugins/R
SS/plugin.py", line 74, in newf
    f(*args, **kwargs)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/plugins/R
SS/plugin.py", line 330, in update_feeds
    self.update_feed_if_needed(feed)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/plugins/R
SS/plugin.py", line 315, in update_feed_if_needed
    if self.is_expired(feed):
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/plugins/R
SS/plugin.py", line 282, in is_expired
    specific_period = self.registryValue('feeds.%s.waitPeriod' % feed.name)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/callbacks
.py", line 1350, in registryValue
    group = group.get(name)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/registry.
py", line 249, in get
    return self.__getattr__(attr)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/registry.
py", line 241, in __getattr__
    self.__nonExistentEntry(attr)
  File "/home/users/mikaela/.local/lib/python3.5/site-packages/supybot/registry.
py", line 221, in __nonExistentEntry
    raise NonExistentRegistryEntry(s)
supybot.registry.NonExistentRegistryEntry: 'elisahäiriö' is not a valid entry 
in 'supybot.plugins.RSS.feeds'

And if I manually call some feed:

2015-10-29 12:56:22+0200 <@Mikaela> !egs
2015-10-29 12:56:23+0200 -- Notice(Euforia): egs — El Goonish Shive - 2015-10-29 — <http://www.egscomics.com/index.php?id=2116>
2015-10-29 12:56:24+0200 -- Notice(Euforia): egs — El Goonish Shive - EGS:NP - 2015-10-28 — <http://www.egscomics.com/egsnp.php?id=374>
2015-10-29 12:56:25+0200 -- Notice(Euforia): egs — El Goonish Shive - EGS:NP - 2015-10-26 — <http://www.egscomics.com/egsnp.php?id=373>
2015-10-29 12:56:29+0200 -- Notice(Euforia): 2015-10-29T06:23:00+0000: egs — El Goonish Shive - 2015-10-29 — <http://www.egscomics.com/index.php?id=2116>

so it seems to check the new feeds and then tell what the latest one is.

progval commented 9 years ago

How did you manage to call a feed “elisahäiriö”?

Mikaela commented 9 years ago

@ProgVal Limnoria renamed the feed from elisahäiriö to elisahäiriö as far as I am aware. Older versions didn't have any issues with feed announcements.

Mikaela commented 9 years ago
2015-11-03 09:56:51+0200 <@Mikaela> !elisahäiriö
2015-11-03 09:56:51+0200 -- Notice(Euforia): Error: NonExistentRegistryEntry: 'elisahäiriö' is not a valid entry in 'supybot.plugins.RSS.feeds'

I believe I am sending valid UTF-8 as I haven't heard complaints implying otherwise.

Mikaela commented 8 years ago

This was fixed by manual config editing and removing all not-ASCII characters from RSS configs, but there are still two issues:

  1. How/Why did Limnoria change ä to that mess?
  2. When failing with one feed, RSS plugin shouldn't ignore the working feeds after that.