Closed frenyman closed 4 years ago
Getting the same issue... my version of ldap3 is 2.5.1.
Running it with python3 gives me:
[] Connecting as anonymous user, dumping will probably fail. Consider specifying a username/password to login with
[] Connecting to host...
[] Binding to host
[+] Bind OK
[] Starting domain dump
Traceback (most recent call last):
File "/usr/bin/ldapdomaindump", line 3, in %s ' % self.formatAttribute(li[att], liIsGroup))
File "/usr/local/lib/python3.7/dist-packages/ldapdomaindump/init.py", line 616, in formatAttribute
return '%.1f minutes' % self.nsToMinutes(att.value)
File "/usr/local/lib/python3.7/dist-packages/ldapdomaindump/init.py", line 452, in nsToMinutes
return abs(length) * .0000001 / 60
TypeError: bad operand type for abs(): 'str'
Traceback (most recent call last):
File "/bin/ldapdomaindump", line 3, in %s ' % self.formatAttribute(li[att], liIsGroup))
File "/usr/lib/python3.8/site-packages/ldapdomaindump/init.py", line 635, in formatAttribute
return '%.1f minutes' % self.nsToMinutes(att.value)
File "/usr/lib/python3.8/site-packages/ldapdomaindump/init.py", line 468, in nsToMinutes
return abs(length) * .0000001 / 60
TypeError: bad operand type for abs(): 'str'
I'm getting the same error. ValueError: invalid literal for int() with base 10: '0:30:00'
Traceback (most recent call last):
File "/usr/local/bin/ldapdomaindump", line 4, in
This is fixed in the latest version. As far as I could see it was only occurring on python 2.x
] Connecting as anonymous user, dumping will probably fail. Consider specifying a username/password to login with [] Connecting to host... [] Binding to host [+] Bind OK [] Starting domain dump Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/opt/scripts/ldapdomaindump/ldapdomaindump/main.py", line 3, in
ldapdomaindump.main()
File "ldapdomaindump/init.py", line 944, in main
dd.domainDump()
File "ldapdomaindump/init.py", line 425, in domainDump
rw.generatePolicyReport(self)
File "ldapdomaindump/init.py", line 827, in generatePolicyReport
html = self.generateHtmlTable(dd.policy, self.policyattributes, 'Domain policy')
File "ldapdomaindump/init.py", line 519, in generateHtmlTable
of.append('%s ' % self.formatAttribute(li[att], liIsGroup))
File "ldapdomaindump/init.py", line 635, in formatAttribute
return '%.1f minutes' % self.nsToMinutes(att.value)
File "ldapdomaindump/init.py", line 468, in nsToMinutes
return abs(length) * .0000001 / 60
TypeError: bad operand type for abs(): 'unicode'