you may try to augment that code by:

import pyPgSQL
from pyPgSQL import PgSQL

Sometimes this "importing the parent first" solved problems for me. Nothing I can explain why, so.

Best wishes,


On 6/15/07, Kingsley <> wrote:

I've got a weird problem with my windows software that's generated
with py2exe.  After many versions generated nicely, and the only
thing (AFAIR) that's changed is python code, suddenly when the
py2exe compiled code calls:

   from pyPgSQL import PgSQL

It's segfaulting the windows exe.

If I run the code standalone on the windows
machine it performs perfectly, only when packaged up
with py2exe does it crash.

Seems to work ok with the MySQL libraries, and it *used*
to work with PostgreSQL.  Maybe there's some change I don't
remember, but should that cause a crash anyway?!

I've checked that py2exe is indeed including both the
postgresql dlls and the pyPgSQL

Any hints on debugging this much appreciated


This email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
Py2exe-users mailing list

GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
fx 01212-5-13695179
EuroPython 2007 will take place in Vilnius, Lithuania from Monday 9th July to Wednesday 11th July. See you there!