plpython intermittent ImportErrors

From: Brian Sutherland <brian(at)vanguardistas(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: plpython intermittent ImportErrors
Date: 2013-01-14 16:30:14
Message-ID: 20130114163014.GA600@Brians-MacBook-Air.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a plpython stored procedure which sometimes fails when I run my
applications automated test suite. The procedure is called hundreds of
times during the tests but only fails a few times, often with the
following ImportError:

Traceback (most recent call last):
File "/Users/jinty/.buildout/eggs/setuptools-0.6c11-py2.7.egg/site.py", line 73, in <module>
__boot()
File "/Users/jinty/.buildout/eggs/setuptools-0.6c11-py2.7.egg/site.py", line 2, in __boot
import sys, imp, os, os.path
File "/Users/jinty/src/mp/lib/python2.7/os.py", line 49, in <module>
import posixpath as path
File "/Users/jinty/src/mp/lib/python2.7/posixpath.py", line 15, in <module>
import stat
ImportError: No module named stat

Changing the order in which the tests are run, or running tests
individually makes the error move/change or disappear. The behaviour is
the same with PostgreSQL versions 9.2.2 and 9.1.7.

I have tried (but failed) to reproduce this error in a simple .sql
script. Outside of the tests, it always seems to work.

Having run into a brick wall debugging this, I'm hoping there's someone
here who can help?

--
Brian Sutherland

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gavin Flower 2013-01-14 16:34:20 Re: Linux Distribution Preferences?
Previous Message Asia 2013-01-14 15:57:01 Re: Libpq and multithreading