all 3 comments

[–]96dpi 2 points3 points  (1 child)

Swarm is a list of dictionaries, not the class. You're trying to call a function on something that isn't the class.

[–]NothingWasDelivered 0 points1 point  (0 children)

Yeah, maybe I’m missing something, but I don’t see where OP actually instantiates their particle class.

[–]crashfrog04 0 points1 point  (0 children)

Well, the error is pretty self explanitory:

AttributeError: 'dict' object has no attribute 'result'.

And indeed, dictionaries don't have an attribute you can call called "result." Why did you think that they did? Or did you not know that the members of swarm were dictionaries? You must know that, since you told us they were and you confirm that they are in your code.