maemo.org Bugzilla – Bug 11816
Can't handle feeds which do not have dates for items
Last modified: 2011-01-26 19:27:20 UTC
You need to log in before you can comment on or make changes to this bug.
SOFTWARE VERSION: 0.8.4 (Settings > General > About product) EXACT STEPS LEADING TO PROBLEM: (Explain in detail what you do (e.g. tap on OK) and what you see (e.g. message Connection Failed appears)) 1. add new feed 2. enter 'http://blog.fefe.de/rss.xml' as it's address 3. select 'update all' 4. try to open the newly created feed EXPECTED OUTCOME: Should display the feeds items ACTUAL OUTCOME: visually, nothing happens, but the following output is produced (visible when started from the shell): --snip-- Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/ReSiStance/gui.py", line 452, in _on_feed_activated news_window = EntriesWindow(feed_data, self.manager, self.settings, self._conn_manager) File "/usr/lib/python2.5/site-packages/ReSiStance/gui.py", line 1194, in __init__ self._add_entries() File "/usr/lib/python2.5/site-packages/ReSiStance/gui.py", line 1245, in _add_entries self.ENTRIES_MODEL_DATE_PARSED_COLUMN, calendar.timegm(entry.updated_parsed)) File "/usr/lib/python2.5/site-packages/feedparser.py", line 236, in __getattr__ raise AttributeError, "object has no attribute '%s'" % key AttributeError: object has no attribute 'updated_parsed' --snap-- REPRODUCIBILITY: always EXTRA SOFTWARE INSTALLED: OTHER COMMENTS: As we can see from the output, it chokes on feeds not having dates for items. Since this is still valid according to the spec, a workaround should be found, for which I suggest adding the the current date when fetching/updating + (if possible) a timestamp (fifo-like for the items), so an ordering is possible.
Sensational report, so providing a quick fix in return :). Fixed in master http://gitorious.org/resistance/resistance/commit/fb18f25afe3a3c027b8bd7f1f3a35cf4410beacf I decided not to show anything in case date is not provided because I don't want to lie to the user as I have no information about when it was published. That feed you gave me had another issue, which is that it has no content. Everything is wrapped into the title field of the feed. That's why I added also an extra check for that http://gitorious.org/resistance/resistance/commit/cc9616bef661045d06750ad5338720e3147493f1 This will be shipped in 0.8.5 if there are urgent bugs to fix. Otherwise expect it in next mayor release, i.e, 0.9
(In reply to comment #1) > Sensational report, so providing a quick fix in return :). > > Fixed in master > http://gitorious.org/resistance/resistance/commit/fb18f25afe3a3c027b8bd7f1f3a35cf4410beacf > > I decided not to show anything in case date is not provided because I don't > want to lie to the user as I have no information about when it was published. Thanks, hope to see it pushed out soon :) As for your concerns about the date and 'lying', I can understand them, but I'd like to have this functionality - could be optional of course. Maybe I'm thinking a little ahead here, but as requested in another bug, a search function would be nice and if I wanted to search by date, i.e. 'all articles between X and Y' I'd be screwed here.