TypeError: cannot convert 'NoneType' object to bytes
See original GitHub issueI’m trying to test out the script, but I get a stack trace and am at a bit of a dead end. Am I missing something here or is this just a bug?
./bloodhound.py -u username -dc HOSTNAME -ns 127.0.0.1
Password:
WARNING: Could not find a global catalog server. Please specify one with -gc
INFO: Connecting to LDAP server: HOSTNAME
Traceback (most recent call last):
File "./bloodhound.py", line 5, in <module>
bloodhound.main()
File "/home/aaron/BloodHound.py/bloodhound/__init__.py", line 275, in main
disable_pooling=args.disable_pooling)
File "/home/aaron/BloodHound.py/bloodhound/__init__.py", line 68, in run
self.pdc.prefetch_info('objectprops' in collect, 'acl' in collect)
File "/home/aaron/BloodHound.py/bloodhound/ad/domain.py", line 329, in prefetch_info
self.get_domains(acl=acls)
File "/home/aaron/BloodHound.py/bloodhound/ad/domain.py", line 203, in get_domains
for entry in entries:
File "/home/aaron/BloodHound.py/bloodhound/ad/domain.py", line 133, in search
for e in sresult:
File "/home/aaron/.local/lib/python3.7/site-packages/ldap3/extend/standard/PagedSearch.py", line 64, in paged_search_generator
None if cookie is True else cookie)
File "/home/aaron/.local/lib/python3.7/site-packages/ldap3/core/connection.py", line 779, in search
check_names=self.check_names)
File "/home/aaron/.local/lib/python3.7/site-packages/ldap3/operation/search.py", line 347, in search_operation
request['baseObject'] = LDAPDN(search_base)
File "/usr/lib/python3.7/site-packages/pyasn1/type/univ.py", line 829, in __init__
base.SimpleAsn1Type.__init__(self, value, **kwargs)
File "/usr/lib/python3.7/site-packages/pyasn1/type/base.py", line 267, in __init__
value = self.prettyIn(value)
File "/usr/lib/python3.7/site-packages/pyasn1/type/univ.py", line 904, in prettyIn
return bytes(value)
TypeError: cannot convert 'NoneType' object to bytes
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
Python Dash TypeError: cannot convert 'NoneType' object to ...
As the error message (which you've already looked up, right?) tells you, you're trying to convert something to bytes format, but that something ......
Read more >Python bytes() - AskPython
Python bytes() is a built-in function which returns a bytes object that is an immutable ... Output. b'' TypeError: cannot convert 'NoneType' object...
Read more >PySNMP: Cannot convert 'NoneType' object to bytes - Checkmk
The context_name interface uses None as value but PySNMP can't handle the context_name None. As default value it needs "" (empty string).
Read more >python-dotenv fails to import PRIVATE_KEY from .env file
python -dotenv fails to import PRIVATE_KEY from .env file: "Cannot convert None of type <class 'NoneType'> to bytes".
Read more >[Example code]-Can't convert 'NoneType' object to str implicitly
If you fail to return, then the result of that function never gets returned all the way back out. Therefore, the result returned...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a strange error, which I agree should be more descriptive. Let’s keep this issue open so I can track it.
I had the same Error and just fixed it. It was just a little typographical error in my code, after i found it everything worked fine again.