New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'NoneType' object is not iterable due to bug in threading code #118
Comments
Hi. Please see #115 and try to apply that fix. I think this might be related. I actually looked into this and it is related to the new threading code in changes.py. |
@adam-waldenberg I found the issure may cause by uncommited(maybe unpushed?) changes. I think this might be helpful;-) |
I have the same problem when using --json (for non json works ok) I get following error after applying patch that @adam-waldenberg suggested: Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/share/gitinspector/gitinspector/blame.py", line 106, in run
self.__handle_blamechunk_content__(row)
File "/usr/share/gitinspector/gitinspector/blame.py", line 87, in __handle_blamechunk_content__
if (self.blamechunk_time - self.changes.first_commit_date).days > 0:
AttributeError: 'Changes' object has no attribute 'first_commit_date' FYI if I replace this: CHANGES_PER_THREAD = 200
NUM_THREADS = multiprocessing.cpu_count() with this (basically disabling multithreading): CHANGES_PER_THREAD = 2000000
NUM_THREADS = 1 things work fine. |
I run into this bug consistently on two repositories. There are no uncommitted changes. I am running ver. 0.4.4. |
@hindsholm, As you can see from the above discussion, the Issue is well understood... I just haven't had time to sit down and actually fix it yet... |
@adam-waldenberg I understand. I just wanted to let you know that the issue will also show up when there are no uncommitted changes :-) |
@hindsholm Yes. Thank you. It's actually caused by a logic error in the threading code (overflow), causing it to end up with an empty changeset. In the meantime you can remedy it with the fix mentioned in #118 (comment). |
@adam-waldenberg I have cloned the repo and applied the workaround and I can confirm that it does indeed work :-) |
@hindsholm it needs to work - It runs around 2-5k times per day for me ;) |
Should be fixed now. Please report any problems. |
Hi
for one particular repository, gitinspector just stopped working
I am running Mac OS El Capitan 10.11.4
script is being run with Python 2.7
It works for other repositories, and if I
git reset --hard HEAD^
(i.e. hard reset to second last commit), it works for this particular repository as well. The last commit that 'breaks' it containts nothing more than a couple of files changed and added (merge from a PR branch). Now adding a new commit on top of HEAD makes it work again.The text was updated successfully, but these errors were encountered: