Tuesday, December 22, 2009

A few tweaks and a gravatar

Two quick problems I solved today that were a bit naging.

When running the app server in Eclipse, it complained I didn't have the Python Image Library (PIL) installed.  Not a huge deal, I'm not going to use PIL now anyway, but I hate runtime errors however innocent they may be.  So I downloaded the PIL source.  Unfortunately I didn't have gcc installed either, so off I go to to find out how to install gcc.  Found an essential developers toolkit for the Mac, Xcode.  This package is great, installs all the dev tools you know and love, and much more.  So with gcc now in place, I built and installed PIL using the instructions in the source.  Went well, and now I don't have an error message when I start the app server.

The second problem was the one I mentioned in the last post.  Everytime I ran the server from within Eclipse, I got this error message.

Variable references empty selection: ${project_loc}

Turns out you need to keep focus on the project as you run it.  So make sure the main project is selected in the package explorer before you execute the Run command.  I suppose this makes sure the ${project_loc} is set.  It sort of makes sense, but is still a little weak.  Thanks to juddsolutions blog post for pointing this out.  It wasn't a Pydev problem after all, we all had to deal with it.


Got a great piece of code from snipt, allowed me to add Gravatars in just about 5 minutes.  It was that easy.


Lastly, if anyone has used django_tables successfully with eclipse and pydev, please let me know.  I installed it correctly, but running the app server from within eclipse throws an error that the library is not found.  It is clearly in the path, both source and runtime (Run) path.  Don't know what is going on.

No comments:

Post a Comment