|
From: <don...@ma...> - 2001-12-28 17:27:26
|
Hey there,
I'm having a similar problem at the moment...
OpenLDAP 2.0.18 (openldap-stable-20011102.tgz)
CVS copy of python-ldap (checked out today in the past 4 hours)
Linux box
trying to do a simple open and getting:
-------------------------------------------------------
Traceback (most recent call last):
File "./ldap_connect", line 7, in ?
import _ldap
ImportError: /usr/local/lib/libldap.so.2: undefined symbol: res_query
-------------------------------------------------------
What I'm guessing is that the CVS copy I checked out isn't stable, or is
calling something that no longer exists in OpenLDAP libs or something...
Can someone confirm this is likely to be the problem... If you need more
details just shout... :)
Thanks
Donal
>-- Original Message --
>From: Michael Str=F6der <mi...@st...>
>Reply-To: mi...@st...
>To: "Jeffrey C. Ollie" <je...@ol...>
>Cc: python-ldap-dev <pyt...@li...>
>Subject: Re: Python parts of module ldap
>Date: Sat, 15 Dec 2001 23:35:48 +0100
>
>
>"Jeffrey C. Ollie" wrote:
>>
>> On Sat, Dec 15, 2001 at 09:31:25PM +0100, Michael Str=F6der wrote:
>> > Jacek Konieczny wrote:
>> > >
>> > > On Sat, Dec 15, 2001 at 09:03:44PM +0100, Michael Str=F6der wrote:=
>> > > > After checking in some of my modules below Lib/ldap/ I noticed
a
>> > > > serious drawback:
>> > > > All modules are dependent on availability of OpenLDAP 2 libs if
>> > > > located under Lib/ldap/ because of the "from _ldap import *" don=
e
>in
>> > > > Lib/ldap/__init__.py.
>> > > >
>> > > [...]
>> > > >
>> > > > Any opinions?
>> > >
>> > > Maybe you could put "from _ldap import *" in some "try:/except:"
block.
>> >
>> > I already thought of that. But this makes error reports about
>> > importing problems somewhat harder. E.g. if linking of shared libs
>> > fails it's much more useful to have the original traceback instead
>> > of e.g. a NameError exception afterwards. That's not good style.
>>
>> What about something like:
>>
>> import sys
>> _ldap_import_exception =3D (None, None, None)
>> try:
>> from _ldap import *
>> except ImportError:
>> _ldap_import_exception =3D sys.exc_info()
>
>Well, then it's easier to tell somebody to do a
>
>$ python -c "import _ldap"
>
>to track down problems.
>
>Another issue I forgot to mention so far is that I can't reuse
>constants of _ldap if importing it fails. I have to define them
>separately anyway.
>
>Hmm, I think I will stick with a separate module package.
>
>Ciao, Michael.
>
>_______________________________________________
>Python-LDAP-dev mailing list
>Pyt...@li...
>https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
|