blaa/PyGene — Issue #2: demo_prog.py: AttributeError: 'MyProg' object has no attribute 'fitness_cache'
Author: vak
Created: 2011-10-09 17:15:13+00:00
State: open

PyGene$ python demo_prog.py
Traceback (most recent call last):
File "demo_prog.py", line 188, in
main()
File "demo_prog.py", line 170, in main
b = pop.best()
File "/tmp/PyGene/pygene/population.py", line 309, in best
self.sort()
File "/tmp/PyGene/pygene/population.py", line 324, in sort
self.organisms.sort()
File "/tmp/PyGene/pygene/organism.py", line 112, in __cmp__
return self.duel(other)
File "/tmp/PyGene/pygene/organism.py", line 104, in duel
return cmp(self.get_fitness(), opponent.get_fitness())
File "/tmp/PyGene/pygene/organism.py", line 89, in get_fitness
if self.fitness_cache is not None:
AttributeError: 'MyProg' object has no attribute 'fitness_cache'