ejwa / gitinspector

:bar_chart: The statistical analysis tool for git repositories
GNU General Public License v3.0
2.36k stars 328 forks source link

Python 3 compatibility of 0.4.2dev (TypeError: can't multiply sequence by non-int of type 'float') #70

Closed RafaelGorski closed 8 years ago

RafaelGorski commented 8 years ago

Hi tried to run the following command with Python 3.4.3 and the following error happen:

py.exe ../gitinspector/gitinspector/gitinspector.py --since="3 weeks ago" -wTHl . Statistical information for the repository 'src' was gathered on 2015/09/25. Traceback (most recent call last): File "../gitinspector/gitinspector/gitinspector.py", line 194, in main() File "../gitinspector/gitinspector/gitinspector.py", line 182, in main run.output() File "../gitinspector/gitinspector/gitinspector.py", line 73, in output outputable.output(changes.ChangesOutput(self.hard)) File "C:\work\git\gitinspector\gitinspector\changes.py", line 272, in init self.changes = get(hard) File "C:\work\git\gitinspector\gitinspector\changes.py", line 263, in get changes = Changes(hard) File "C:\work\git\gitinspector\gitinspector\changes.py", line 193, in init self.commits = [None] * (len(lines) / CHANGES_PER_THREAD + 1) TypeError: can't multiply sequence by non-int of type 'float'

The version from google code works fine and generate the output.

adam-waldenberg commented 8 years ago

Good catch. The last stable release here on GitHub (0.4.1) should work as well. I need to improve the test suite of gitinspector to catch these things when they pop up. I actually haven't tested the current dev branch with Python 3. I tend to do an overhaul before making a new release.

In any case, I'll look at Python 3 compatibility tonight. More than one thing tends to break.

adam-waldenberg commented 8 years ago

There. The above commit should have fixed it.

RafaelGorski commented 8 years ago

cool @adam-waldenberg ! I will test it early next week.