python-chess-annotator
python-chess-annotator copied to clipboard
ZeroDivisionError: float division by zero -- seems to be a different one from reported previously
This happened for the game downloaded from lichess, it had a proper PGN header, but the game was "1. e4 e6 0-1" -- that's it, white resigned.
An unhandled exception occurred: <class 'ZeroDivisionError'>
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/dist-packages/annotator/__main__.py", line 811, in <module>
main()
File "/usr/local/lib/python3.6/dist-packages/annotator/__main__.py", line 801, in main
raise e
File "/usr/local/lib/python3.6/dist-packages/annotator/__main__.py", line 794, in main
engine, args.threads)
File "/usr/local/lib/python3.6/dist-packages/annotator/__main__.py", line 655, in analyze_game
time_per_move = get_time_per_move(pass1_budget, ply_count)
File "/usr/local/lib/python3.6/dist-packages/annotator/__main__.py", line 543, in get_time_per_move
return float(pass_budget) / float(ply_count)
ZeroDivisionError: float division by zero