More tips and tricks
June 2, 2012
psycopg2 mx.DateTime issue quick fix
If you ever get the dreaded mx.DateTime psycopg2 error when running django tests, (this is for psycopg2 == 2.4.1) this is because when you’re in a virtualenv the python mx libraries don’t transfer over
some reason. the quick fix is to pip install egenix-mx-base and you should be good to go. for reference latest versions of psycopg2 seem to have an issue with transaction commits during unit tests, for now i’m running psycopg2==2.4.1, anything newer runs into the autocommit issue for unit tests.
good postgresql required reading
http://thebuild.com/presentations/not-your-job.pdf
I’m going to add this to the printing.py file in the dimagi-utils project:
Written by
Dimagi
Technology