Comment 7 for bug 616582

Revision history for this message
Tom Inglis (tominglis) wrote : Re: [Bug 616582] Re: gwibber crashes on load with KeyError on sender

Nice, that seemed to do the trick - thanks dude!

On Tue, 2010-08-24 at 12:05 +0000, Matt Hoskins wrote:
> Having a look at the code, it seems that the facebook code for gwibber
> in lucid doesn't always initialise the sender part of a message to an
> empty dict, so if the code lower down doesn't set it then it will cause
> a problem (it looks like code for other systems like twitter etc always
> initialise the sender as blank).
>
> To fix the problem on my system I edited:
> /usr/lib/python2.6/dist-packages/gwibber/microblog/facebook.py
>
> I found the code reading:
> if data.get("actor_id", 0) in profiles:
> m["sender"] = self._sender(profiles[data["actor_id"]])
>
> And after it added:
> else:
> m["sender"] = {}
>
> Unfortunately couchdb for gwibber will have cached the problem entry. I went for the easy option of clearing it out by removing the data file (as gwibber will just regrab the content). So I killed off gwibber, gwibber-service and the couchdb service and then removed:
> ~/.local/share/desktop-couch/gwibber_messages.couch
>
> Starting up gwibber and everything now behaves.
>