MIT does something tasty

As a Rensselaer graduate, I really hate to point at an event at MIT, but in the spirit of Purim, I’ll make an exception for the 3rd annual Face Off on Latkes Versus Hamantaschen (info courtesy of Diane Reese).

I’m not sure which I prefer, though I must admit I really enjoyed the hamentaschen we had during our most recent Shir Hadash book group meeting (and they were baked by 3rd graders).

On the other hand, I know the holiday food I don’t enjoy, and it’s just around the corner: matzo. Definitely the bread of affliction….

It feels so good when I stop

The last thing I wrote here was, “It beats debugging my code!”

Boy, was I ever right.

Though it actually wasn’t my code — just code I was installing.

Last week, I set up a server at work to run Trac and Subversion. It was easy to do, too.

But on Monday, one of my colleagues asked me if I could make it possible to administer the Trac over the web instead of having to log onto the server and use the trac-admin command line tool; this seemed like a reasonable request, so I found the WebAdmin plugin. The plugin comes packaged as a Python Egg, and if I had just downloaded it and installed it, all would have been well.

But I also followed the documentation links to read about Easy Install, which clearly said that Python 2.3.5 or 2.4 would be needed. But the version of Python on the system was 2.3.4. So I downloaded Python 2.3.5, compiled it, and installed it. And while I was at it, I brought in new versions of sqlite and pysqlite.

This was a mistake. First, things just got inconsistent — eventually, a friend suggested I try running sbin/ldconfig to rebuild the shared library cache, and that helped some. But I couldn’t get Trac to work. It failed in all sorts of amusing ways, generally with Python import errors. Or segfaults. Or other horrors.

And I couldn’t figure out how to go back to the versions of code I had (and by this time, I’d forgotten how many things I’d updated — I’d gotten out of the habit of taking notes on system upgrades, definitely a mistake). So I went home and continued trying to debug the problem all Monday night.

And I do mean all night — even after I turned off the computer, I had the problem racing around my brain, and so I didn’t sleep very well.

Tuesday, I got smarter, and asked the IGS guy who owns the machine to put Python 2.3.4 back on. This took a while, since he had other work to do, too, but he finally was able to reinstall the original RPMs, rebuild the cache, and we were back to 2.3.4. But Trac still failed.

I stayed at work till 6pm last night working on the problem, with no success. Then I came home and crashed — I’d been fighting a cold, and the lack of sleep Monday night gave it the upper hand over me.

Today, I stayed home, since I didn’t feel all that great. But I kept working on the bug, rebuilding software and reinstalling it, and eventually, I was able to get Apache to consistently take a segfault whenever I tried to use Trac. So I did what I probably should have done two days ago — I Googled. My import errors seemed to be due to pysqlite2, so I decided to blame it for the segfault, too, and tried “pysqlite2 segmentation fault” as a search term. Two minutes later, I was looking at this post. I downgraded to pysqlite 2.0.7, and the segfault went away. I guess the claim that 2.1.3 is stable is still premature.

I wasn’t quite finished with my problems, though — for some reason, I couldn’t get the PYTHON_EGG_CACHE variable to be honored under Apache, so my eggs couldn’t hatch, but I was not alone in having that problem, and the solution was simple — just unzip the egg in the site-packages directory. And with that done, Trac came back up.

And I was able to use WebAdmin, too.

There are times I really hate computers.