Main menu

Post navigation

Getting crazy with gwibber, part 1, or python-simplejson and the evil file

I met Gwibber about 5 months ago, and was a happy user. For those who don’t know Gwibber, it’s a identi.ca/twitter/many more client for Gnome.

Well, the one feature I was missing on it was a tab only for replies, as TwitterFox does, and one day @jorge announced (and other people excited about it commented) on identi.ca that the newest version just released that time got that tab. So, I ran to find a console window, and then, after the update, thought: “Cool! Let’s check out the new feature!”. Closed gwibber, reopened and.. sigh. It suddenly stopped working.

I thought myself “WTH”, and kept trying to open it, without success. It was freezing, after a few seconds open.

Finding that thing weird, I started doing the good’ol debugging thing, and found out that the problem was when retrieving messages. With the possible bug in hands, went to my beloved Launchpad to see if there were any open bugs reporting the problem, and if not, open a new one providing all the info I’d gathered in all that debugging. For my luck (or not :)) I’ve found one possible bug, and then commented on it, giving the problem I was having:

At that point I already had tried everything: reinstalling python-simplejson, gwibber and python-webkitgtk, also using –purge, and nothing.
One suggested that it could be my version of python-simplejson, considering that this error wasn’t supposed to happen with python-simplejson version 1.9.1. Unfortunately, that was exactly my version according to dpkg, and I got desolated. What would I do?

So I downloaded gwibber code and started messing to see how stuff works, and then realized that doing a import simplejson and calling the dumps function would give me the same error, so the problem wasn’t on gwibber or the way it could be calling the module. Given that, intrigued, opened ipython, did again the same import simplejson, simplejson.dumps(default=”bla”, {}) thing and noticed this time:

Yes, a simplejson.__version__ confirmed the crack: 1.7.3. But why oh why that thing was there if I uninstalled and installed it exaustively, and then checked and rechecked the package version with dpkg -L python-simplejson?

After a minute of frustration, I realized the python-simplejson package wasn’t placing any files on that folder. Maybe because of a packaging problem, removing python-simplejson package didn’t erased the file on site-packages. A rm -rf simplejson-1.7.3-py2.5-linux-i686.egg was enough to solve the problem. After that, just out of curiosity, I did the import simplejson and voila, version 1.9.1.

It stopped freezing, but the window it open was blank. So what now? More in the next post..