rajrakeshdr / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

ZeroDivisionError in analyzer #212

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With svn 609.
After a gbtami vs. PyChess game finished by 3 repetition draw, i got:

Time left: 264 seconds; Thinking for 88 seconds
result 1/2-1/2
last: 3 0
3   0.69    0   219     Ra7+
8.1 moves/position; 433.3 n/s
1   0.00    0   0   
2007-09-20 09:08:38 Default Error: Thread <Worker(Thread-5, started
daemon)> in threadpool raised following error:
Traceback (most recent call last):
  File "/home/tamas/svn/pychess/lib/pychess/System/ThreadPool.py", line 51,
in run
    self.func()
  File "/home/tamas/svn/pychess/lib/pychess/System/ThreadPool.py", line 33,
in <lambda>
    a.func = lambda: func(*args)
  File "/home/tamas/svn/pychess/lib/pychess/Players/PyChess.py", line 189,
in analyze
    print "%0.1f moves/position; %0.1f n/s" % \
ZeroDivisionError: float division

Original issue reported on code.google.com by gbtami on 20 Sep 2007 at 7:17

GoogleCodeExporter commented 9 years ago
Ah yeah, if we are interrupted before any positions are searched, we can't print
moves/position.
Fixed in 910

Original comment by lobais on 20 Sep 2007 at 1:53