Mailing List Archive

Problem with informixdb and python1.5.2
I've been using the informixdb module (version 1.2a1) with python1.5.1 for a
while now with no problems. Just a few days ago we installed python1.5.2,
and now informixdb won't work any more. when I attempt to construct a
Connection object, I get an error about "unable to get name of current
working directory." Here's a log of my interaction with the interpreter

Python 1.5.2 (#8, Jul 1 1999, 20:22:25) [GCC 2.7.2.3] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import informixdb
>>> con = informixdb.informixdb('acme_online_demo')
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "informixdb.py", line 47, in __init__
self.conn = _informixdb.informixdb(logon)
InformixdbError: Error -922 performing LOGON: Cannot get name of current
working directory.
>>>


Informix's finderr informs me that "-922" means:

"A problem exists with the current working directory on this system or
on another computer system that your application is using. Possibly
your account does not have read access to the directory, or possibly
the file system that contains it is improperly mounted. Exit your
application, and retry. If the problem persists, see your system
administrator for assistance."

which does not make any sense. Our Informix setup has not changed for the
last few months, and
the informixdb modules continues to work great under python1.5.1.

Does anyone have any suggestions on what might be wrong?
Problem with informixdb and python1.5.2 [ In reply to ]
From: "Ken Liu" <kyliu@idiomtech.com>

I've been using the informixdb module (version 1.2a1) with python1.5.1 for a
while now with no problems. Just a few days ago we installed python1.5.2,
and now informixdb won't work any more. when I attempt to construct a
Connection object, I get an error about "unable to get name of current
working directory." Here's a log of my interaction with the interpreter

Python 1.5.2 (#8, Jul 1 1999, 20:22:25) [GCC 2.7.2.3] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import informixdb
>>> con = informixdb.informixdb('acme_online_demo')
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "informixdb.py", line 47, in __init__
self.conn = _informixdb.informixdb(logon)
InformixdbError: Error -922 performing LOGON: Cannot get name of current
working directory.
>>>


Informix's finderr informs me that "-922" means:

"A problem exists with the current working directory on this system or
on another computer system that your application is using. Possibly
your account does not have read access to the directory, or possibly
the file system that contains it is improperly mounted. Exit your
application, and retry. If the problem persists, see your system
administrator for assistance."

which does not make any sense. Our Informix setup has not changed for the
last few months, and
the informixdb modules continues to work great under python1.5.1.

Does anyone have any suggestions on what might be wrong?
Problem with informixdb and python1.5.2 [ In reply to ]
From: Thomas Bryan <tbryan@arlut.utexas.edu>

Ken Liu wrote:
>
> I've been using the informixdb module (version 1.2a1) with python1.5.1 for a
> while now with no problems. Just a few days ago we installed python1.5.2,
> and now informixdb won't work any more. when I attempt to construct a
> Connection object, I get an error about "unable to get name of current
> working directory." Here's a log of my interaction with the interpreter

Do you now have both python 1.5.1 and python1.5.2 installed?

> which does not make any sense. Our Informix setup has not changed for the
> last few months, and the informixdb modules continues to work great
> under python1.5.1.
>
> Does anyone have any suggestions on what might be wrong?

informixdb might be getting confused about which Python
version/libraries it should be using. I'm not sure how to
determine whether that's the problem, but I know that others
have had problems with various packages when they have two
versions of Python installed at the same time.

Have you tried recompiling informixdb with the 1.5.2 header files?
I don't think that too much has changed between 1.5.1 and 1.5.2, but
it couldn't hurt to try.
Problem with informixdb and python1.5.2 [ In reply to ]
Ken Liu wrote:
>
> I've been using the informixdb module (version 1.2a1) with python1.5.1 for a
> while now with no problems. Just a few days ago we installed python1.5.2,
> and now informixdb won't work any more. when I attempt to construct a
> Connection object, I get an error about "unable to get name of current
> working directory." Here's a log of my interaction with the interpreter

Do you now have both python 1.5.1 and python1.5.2 installed?

> which does not make any sense. Our Informix setup has not changed for the
> last few months, and the informixdb modules continues to work great
> under python1.5.1.
>
> Does anyone have any suggestions on what might be wrong?

informixdb might be getting confused about which Python
version/libraries it should be using. I'm not sure how to
determine whether that's the problem, but I know that others
have had problems with various packages when they have two
versions of Python installed at the same time.

Have you tried recompiling informixdb with the 1.5.2 header files?
I don't think that too much has changed between 1.5.1 and 1.5.2, but
it couldn't hurt to try.
Problem with informixdb and python1.5.2 [ In reply to ]
Thomas Bryan <tbryan@arlut.utexas.edu> wrote:

> Do you now have both python 1.5.1 and python1.5.2 installed?

Yes.

> Have you tried recompiling informixdb with the 1.5.2 header files?
> I don't think that too much has changed between 1.5.1 and 1.5.2, but
> it couldn't hurt to try.

That sounds like the thing to do. In fact, I did change the PYTHONINCL and PYTHONLIB dirs
to point to the 1.5.2 directories and recompiled informixdb, but the same problem persists.

so is the common experience that the modules don't work when you have multiple versions of
python installed? Why is that? Is there anyway for me to "unconfuse" the module so that
it would ignore the 1.5.1 installation (short of actually removing it...)?


thanks much

k
Problem with informixdb and python1.5.2 [ In reply to ]
From: Ken Liu <kyliu@idiomtech.com>

Thomas Bryan <tbryan@arlut.utexas.edu> wrote:

> Do you now have both python 1.5.1 and python1.5.2 installed?

Yes.

> Have you tried recompiling informixdb with the 1.5.2 header files?
> I don't think that too much has changed between 1.5.1 and 1.5.2, but
> it couldn't hurt to try.

That sounds like the thing to do. In fact, I did change the PYTHONINCL and
PYTHONLIB dirs
to point to the 1.5.2 directories and recompiled informixdb, but the same
problem persists.

so is the common experience that the modules don't work when you have multiple
versions of
python installed? Why is that? Is there anyway for me to "unconfuse" the
module so that
it would ignore the 1.5.1 installation (short of actually removing it...)?


thanks much

k
Problem with informixdb and python1.5.2 [ In reply to ]
Ken Liu wrote:

> > Have you tried recompiling informixdb with the 1.5.2 header files?
> > I don't think that too much has changed between 1.5.1 and 1.5.2, but
> > it couldn't hurt to try.
>
> That sounds like the thing to do. In fact, I did change the
> PYTHONINCL and PYTHONLIB dirs to point to the 1.5.2 directories
> and recompiled informixdb, but the same problem persists.
>
> so is the common experience that the modules don't work when you have
> multiple versions of python installed? Why is that?

I don't think it's common. I have one system with two Pythons, and
all of the modules seem to find the correct Python. I just know that
I've seen some posts that mention such problems. (Perhaps only on
Windows systems?)

The best venue for this question may be the db-sig mailing
list. Try asking your question again there.


-------------------------------------------
Tom Bryan
Applied Research Laboratories
University of Texas at Austin
Problem with informixdb and python1.5.2 [ In reply to ]
Ken Liu wrote:
>

> Python 1.5.2 (#8, Jul 1 1999, 20:22:25) [GCC 2.7.2.3] on linux2
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import informixdb
> >>> con = informixdb.informixdb('acme_online_demo')
> Traceback (innermost last):
> File "<stdin>", line 1, in ?
> File "informixdb.py", line 47, in __init__
> self.conn = _informixdb.informixdb(logon)
> InformixdbError: Error -922 performing LOGON: Cannot get name of current
> working directory.
> >>>

Can informix read your current working directory? I've certainly seen
this cause problems with dbaccess, so I don't see why the ESQL/C
libraries should be much different.

Dominic
--
Dominic Binks/Systems Engineer/Logica-Aldiscon
400 Park Avenue/Aztec West/Bristol/BS32 4TR/United Kingdom
Tel: +44 1454 614455/Fax: +44 1454 620527/Mobile: +44 498 693964
E-mail: dominic.binks@aethos.co.uk
Problem with informixdb and python1.5.2 [ In reply to ]
Dominic Binks wrote:
>
> Ken Liu wrote:
>>
>> Python 1.5.2 (#8, Jul 1 1999, 20:22:25) [GCC 2.7.2.3] on linux2
>> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>> >>> import informixdb
>> >>> con = informixdb.informixdb('acme_online_demo')
>> Traceback (innermost last):
>> File "<stdin>", line 1, in ?
>> File "informixdb.py", line 47, in __init__
>> self.conn = _informixdb.informixdb(logon)
>> InformixdbError: Error -922 performing LOGON: Cannot get name of current
>> working directory.
>> >>>
>
> Can informix read your current working directory? I've certainly seen
> this cause problems with dbaccess, so I don't see why the ESQL/C
> libraries should be much different.

As it happens, Ken's problem turned out to be not with the informixdb
module nor the Informix ESQL/C runtime, but with the Python interpreter
-- or more precisely, the C runtime library(ies) with which Python was
linked. All calls to the getcwd C function were failing with an errno
of ENOENT, as seen below in the exception raised by the os.getcwd Python
function:

>>> import os
>>> os.getcwd()
Traceback (innermost last):
File "<stdin>", line 1, in ?
OSError: [Errno 2] No such file or directory
>>>

Using ldd to check the list of shared objects loaded for the python
executable revealed the problem's root cause. Ken explained in an
email:
> thanks, this allowed me to track down the problem. In order to get readline
> support, I had to link against libtermcap, which linked against libc.so.5,
> so my python was linked against both libc.so.6 and libc.so.5, and chaos
> ensued. So now I changed it to link against libncurses and everything is
> working great.

Don't you just love a story with a happy ending? :-)

--
Stephen J. Turner <sjturner@ix.netcom.com>