CodeReclaimers / neat-python

Python implementation of the NEAT neuroevolution algorithm
BSD 3-Clause "New" or "Revised" License
1.41k stars 490 forks source link

AttributeError: 'NoneType' object has no attribute 'x' #205

Closed penneShells closed 4 years ago

penneShells commented 4 years ago

I am getting a nonetype error with my output code. Not too sure what the problem is, thanks for any opinions of the issue!

Traceback (most recent call last): File "/home/pi/Documents/tetrisai/neattetristhing.py", line 272, in run(config_path) File "/home/pi/Documents/tetrisai/neattetristhing.py", line 260, in run winner = p.run(main,50) File "/home/pi/.local/lib/python3.7/site-packages/neat/population.py", line 89, in run fitness_function(list(iteritems(self.population)), self.config) File "/home/pi/Documents/tetrisai/neattetristhing.py", line 152, in main output = nets[x].activate((figure.x, figure.y, game.height, game.width, game.score)) AttributeError: 'NoneType' object has no attribute 'x'

penneShells commented 4 years ago

Nvm, entirely my fault, i think. Nothing to do with the library, im just dumb. Sorry!