amondnet / amondnet/gitinspector

Zero division error

Open
#63 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated OpSys-All Priority-Medium Type-Defect
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
What steps will reproduce the problem?

Below steps cannot be directly reproduced since the project it was measured by
gitinspector is proprietary.

1. Clone gitinspector.
2. Run gitinspector with following options:
python gitinspector/gitinspector.py --format=htmlembedded
--localize-output=true --file-types=java,xml,js,properties
../proprietary-project/ > stats.html

What is the expected output? What do you see instead?

Expected output: generated stats.html file for proprietary-project repository.
Instead ZeroDivisionError was encountered:

Traceback (most recent call last):
File "gitinspector/gitinspector.py", line 194, in
main()
File "gitinspector/gitinspector.py", line 182, in main
__run__.output()
File "gitinspector/gitinspector.py", line 76, in output
outputable.output(blame.BlameOutput(self.hard, self.useweeks))
File "/home/karma/git/gitinspector/gitinspector/outputable.py", line 36, in output
outputable.output_html()
File "/home/karma/git/gitinspector/gitinspector/blame.py", line 243, in output_html
blame_xml += "" + ("{0:.1f}".format(Blame.get_stability(entry[0], entry[1].rows, self.changes)) + "")
File "/home/karma/git/gitinspector/gitinspector/blame.py", line 175, in get_stability
return 100.0 * blamed_rows / changes.get_authorinfo_list()[author].insertions
ZeroDivisionError: float division by zero

Please use labels and text to provide additional information.

If submitting a patch, you guarantee that you are the original author of
the work or that the patch is based on code from a compatible license.

```

Original issue reported on code.google.com by `kamila.chyla` on 15 Apr 2015 at 6:17

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.