Hi everyone, today I’m posting this because I get the most strange bug of my Pythonista experience. I was experiencing with neural networks made from scratch (in fact, behaviour of raptor VS sheep) and I get an amazingly simple TypeError in my main.py file (l.131):
Traceback (most recent call last):
File "/var/containers/Bundle/Application/2BCE66D1-3EB5-46DC-AFEE-F33C73B6BB37/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/scene.py", line 199, in _draw
self.update()
File "/private/var/mobile/Containers/Shared/AppGroup/D48F6FDD-3F34-40EB-9497-17B2560BB120/Pythonista3/Documents/Neural Networks/RAPTOR-MOUTON/main.py", line 232, in update input = self.get_input(agent) File "/private/var/mobile/Containers/Shared/AppGroup/D48F6FDD-3F34-40EB-9497-17B2560BB120/Pythonista3/Documents/Neural Networks/RAPTOR-MOUTON/main.py", line 131, in get_input obj.position[0], obj.position[1])
TypeError: 'NoneType' object is not iterable
I get a NoneType object in a list, but I tried to debunk it in every way without seeing a single “None”..... I’m despaired...
I tried one hundred times to resolve this, but even when I check before execution If BOTH positions (of f.vision_cut() args - > l.130) aren’t NoneType objects, I get the same error. Here is below the link of my project, with images and others scripts included in the project. Please just try and see how weird it is.
https://www.dropbox.com/sh/ryf9tk90b1vtu38/AADJ_Xu6UIDstZJc6HEJ6RCxa?dl=0
Thanks in advance for every answer !
Cordially,
SmartGoat
P.S: I don’t have included comments, tell it to me if you absolutely need them to solve the bug, and I’ll make commented versions of my code. Have a nice day/night !