#105 When doing dsidm... user get_dn, this is the error: TypeError: argument 1 must be str, not function
Closed: Fixed 6 years ago Opened 6 years ago by alisha17.

[root@localhost ~]# dsidm -v -b "dc=google,dc=com" -D "cn=Directory Manager" ldap://tinni.google.com:389 user get_dn
The 389 Directory Server Identity Manager
Inspired by works of: ITS, The University of Adelaide
dsrc path: /root/.dsrc
dsrc instances: []
dsrc no such section ldap://tinni.google.com:389
Called with: Namespace(basedn='dc=google,dc=com', binddn='cn=Directory Manager', dn=None, func=<function get_dn at 0x7ff4d7923d08>, instance='ldap://tinni.google.com:389', starttls=False, verbose=True)
Instance details: {'uri': 'ldap://tinni.google.com:389', 'basedn': 'dc=google,dc=com', 'binddn': 'cn=Directory Manager', 'saslmech': None, 'tls_cacertdir': None, 'tls_cert': None, 'tls_key': None, 'tls_reqcert': 1, 'starttls': False}
SER_SERVERID_PROP not provided, assuming non-local instance
Allocate <class 'lib389.DirSrv'> with ldap://tinni.google.com:389
Allocate <class 'lib389.DirSrv'> with None:None
Enter password for cn=Directory Manager on ldap://tinni.google.com:389 :
SER_SERVERID_PROP not provided, assuming non-local instance
Allocate <class 'lib389.DirSrv'> with ldap://tinni.google.com:389
Allocate <class 'lib389.DirSrv'> with None:None
open(): Connecting to uri ldap://tinni.google.com:389
open(): bound as cn=Directory Manager
_gen_dn filter = (&(objectclass=account)(objectclass=posixaccount)(objectclass=inetOrgPerson)(objectclass=organizationalPerson))
Traceback (most recent call last):
File "/sbin/dsidm", line 103, in <module>
args.func(inst, dsrc_inst['basedn'], log, args)
File "/usr/lib/python3.6/site-packages/lib389/cli_idm/user.py", line 40, in get_dn
_generic_get_dn(inst, basedn, log.getChild('_generic_get_dn'), MANY, dn)
File "/usr/lib/python3.6/site-packages/lib389/cli_base/init.py", line 119, in _generic_get_dn
o = mc.get(dn=dn)
File "/usr/lib/python3.6/site-packages/lib389/_mapped_object.py", line 750, in get
results = self._get_dn(dn)
File "/usr/lib/python3.6/site-packages/lib389/_mapped_object.py", line 768, in _get_dn
attrlist=self._list_attrlist,
File "/usr/lib/python3.6/site-packages/lib389/init.py", line 162, in inner
return f(args, kwargs)
File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 773, in search_s
return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout)
File "/usr/lib/python3.6/site-packages/lib389/init.py", line 162, in inner
return f(*args,
kwargs)
File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 766, in search_ext_s
msgid = self.search_ext(base,scope,filterstr,attrlist,attrsonly,serverctrls,clientctrls,timeout,sizelimit)
File "/usr/lib/python3.6/site-packages/lib389/init.py", line 162, in inner
return f(
args, kwargs)
File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 762, in search_ext
timeout,sizelimit,
File "/usr/lib/python3.6/site-packages/lib389/init.py", line 162, in inner
return f(*args,
kwargs)
File "/usr/lib64/python3.6/site-packages/ldap/ldapobject.py", line 265, in _ldap_call
result = func(args,*kwargs)
TypeError: argument 1 must be str, not function


Metadata Update from @firstyear:
- Custom field Origin adjusted to None
- Custom field Review Status adjusted to review

6 years ago

@alisha17 Would you mind checking this patch fixes the error for you, and review the code that was changed?

@spichugi Can I get you to check and ack please also?

@firstyear It doesn't fixes the error for me. Still the same error as in the bug description.

Did you make lib389-install or set PYTHONPATH to the ds/src/lib389 correctly?

Yeah I already did that. @firstyear

Can you paste me the output/email it to me? I want to see what's going on here. I can't reproduce this with the patch. ...

Hey @spichugi , @alisha17 has confirmed the fix here, can you just follow up with a quick code review for me?

The error is fixed now! Works for me. Thanks!

Metadata Update from @spichugi:
- Custom field Review Status adjusted to ack (was: review)

6 years ago

commit 955510cd06cd6802699c332551f1e0a6c0879b2b
To ssh://git@pagure.io/389-ds-base.git
a60ee09..955510c master -> master

Metadata Update from @firstyear:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

6 years ago

Login to comment on this ticket.

Metadata