TypeError: argument of type 'NoneType' is not iterable
KBCShared opened this issue · comments
Random IT Sec Dude commented
Hi,
the script threw the following error when scanning
https://github.com/nbsullivan/hashtagcluster/blob/71c978ee41dc1ccdbdba8ee93507a2e418798ece/data/results/emmybatchpreds/#Emmys_batch5080usercount.csv :
Failed check: Ignore Fuzzy Signature on Contents (100% Similarity)
Skipping...
https://github.com/nbsullivan/hashtagcluster/blob/71c978ee41dc1ccdbdba8ee93507a2e418798ece/data/results/emmybatchpreds/#Emmys_batch5080usercount.csv
Traceback (most recent call last):
File "./gitgot.py", line 374, in <module>
main()
File "./gitgot.py", line 370, in main
api_request_loop(state)
File "./gitgot.py", line 246, in api_request_loop
if should_parse(repo, state) or stepBack:
File "./gitgot.py", line 102, in should_parse
candidate_sig = ssdeep.hash(repo.decoded_content)
File "/usr/local/lib/python3.7/dist-packages/github/ContentFile.py", line 62, in decoded_content
assert self.encoding == "base64", "unsupported encoding: %s" % self.encoding
File "/usr/local/lib/python3.7/dist-packages/github/ContentFile.py", line 82, in encoding
self._completeIfNotSet(self._encoding)
File "/usr/local/lib/python3.7/dist-packages/github/GithubObject.py", line 265, in _completeIfNotSet
self._completeIfNeeded()
File "/usr/local/lib/python3.7/dist-packages/github/GithubObject.py", line 269, in _completeIfNeeded
self.__complete()
File "/usr/local/lib/python3.7/dist-packages/github/GithubObject.py", line 276, in __complete
self._storeAndUseAttributes(headers, data)
File "/usr/local/lib/python3.7/dist-packages/github/GithubObject.py", line 100, in _storeAndUseAttributes
self._useAttributes(attributes)
File "/usr/local/lib/python3.7/dist-packages/github/ContentFile.py", line 192, in _useAttributes
if "content" in attributes: # pragma no branch
TypeError: argument of type 'NoneType' is not iterable
Jake Miller commented
Hi KBCShared,
Thank you for the bug report! This is actually an issue in PyGithub due to oddities with the way the '#' character (server-side not client side) is used in the GitHub API. I created a temporary fix in GitGot until this is fixed in PyGithub.
Thank you!
Jake