Re: [GENERAL] plpython intermittent ImportErrors

2013-01-17 Thread Brian Sutherland
On Thu, Jan 17, 2013 at 01:25:54PM +0100, Alban Hertroys wrote: > On 17 January 2013 12:30, Brian Sutherland wrote: > > > > (we use buildout for our Python code, but our plpythonu stored > > > procedures use the stock standard Python environment, as provided by > > > the Ubuntu packages). > > > >

Re: [GENERAL] plpython intermittent ImportErrors

2013-01-17 Thread Alban Hertroys
On 17 January 2013 12:30, Brian Sutherland wrote: > > (we use buildout for our Python code, but our plpythonu stored > > procedures use the stock standard Python environment, as provided by > > the Ubuntu packages). > > Sadly, I need to get this running on OSX as that's what our developers > use.

Re: [GENERAL] plpython intermittent ImportErrors

2013-01-17 Thread Brian Sutherland
On Thu, Jan 17, 2013 at 03:18:09PM +0700, Stuart Bishop wrote: > On Mon, Jan 14, 2013 at 11:30 PM, Brian Sutherland > wrote: > > 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 d

Re: [GENERAL] plpython intermittent ImportErrors

2013-01-17 Thread Stuart Bishop
On Mon, Jan 14, 2013 at 11:30 PM, Brian Sutherland wrote: > 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 Import

Re: [GENERAL] plpython intermittent ImportErrors RESOLVED

2013-01-16 Thread Adrian Klaver
On 01/16/2013 08:20 AM, Brian Sutherland wrote: On Mon, Jan 14, 2013 at 09:05:09AM -0800, Adrian Klaver wrote: On 01/14/2013 08:30 AM, Brian Sutherland wrote: I had a look at the files open by the process, there were not that many, so no leaks or anything. Just an utterly insane OSX default

Re: [GENERAL] plpython intermittent ImportErrors RESOLVED

2013-01-16 Thread Brian Sutherland
On Mon, Jan 14, 2013 at 09:05:09AM -0800, Adrian Klaver wrote: > On 01/14/2013 08:30 AM, Brian Sutherland wrote: > >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 b

Re: [GENERAL] plpython intermittent ImportErrors

2013-01-16 Thread Brian Sutherland
On Wed, Jan 16, 2013 at 08:10:26AM +1100, Chris Angelico wrote: > On Tue, Jan 15, 2013 at 4:55 AM, Brian Sutherland > wrote: > > I'm guessing that it's some kind of race condition, but I wouldn't know > > where to start looking. > > Look for a recursive import (A imports B, B imports A) I've al

Re: [GENERAL] plpython intermittent ImportErrors

2013-01-15 Thread Chris Angelico
On Tue, Jan 15, 2013 at 4:55 AM, Brian Sutherland wrote: > I'm guessing that it's some kind of race condition, but I wouldn't know > where to start looking. Look for a recursive import (A imports B, B imports A) or multiple threads trying to import simultaneously - Python sometimes has issues wit

Re: [GENERAL] plpython intermittent ImportErrors

2013-01-14 Thread Adrian Klaver
On 01/14/2013 09:55 AM, Brian Sutherland wrote: 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 simp

Re: [GENERAL] plpython intermittent ImportErrors

2013-01-14 Thread Brian Sutherland
On Mon, Jan 14, 2013 at 09:05:09AM -0800, Adrian Klaver wrote: > On 01/14/2013 08:30 AM, Brian Sutherland wrote: > >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 b

Re: [GENERAL] plpython intermittent ImportErrors

2013-01-14 Thread Adrian Klaver
On 01/14/2013 08:30 AM, Brian Sutherland wrote: 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: Traceba