Need some help with this weird bug.

Here is a somewhat modified version of Chase Moskal’s pathfinding demo. It works perfectly fine on Blender 2.56 without any errors.

Pathfinder survo (A Star) - Simple 1.blend (627 KB)

And below is my attempt at making a simple demo based on the above file.

My Pathfinding Demo.blend (528 KB)

My pathfinding demo works fine, however, it gives me this error every time I try to run it.

Python script error from controller "cont#CONTR#1":
Traceback (most recent call last):
 File "follower", line 29, in <module>
AttributeError: 'module' object has no attribute 'MouseButtons'

I have no idea why I keep getting this error even though I used the exact same code and haven’t changed a single line from the original file! well, aside from the mesh values of, of course.

I checked, double checked and triple checked all logic bricks to make sure that they are connected correctly, and I even renamed all the objects in my demo to be the same as the original file’s objects, but still I have not found the source of this bug.

I would really appreciate any helpful tips on anything else besides logic bricks and names which I may have missed.

The difference between your and the original is that you don’t have the keyboard sensors for rotating the map. Without this sensors the folower script starts before the overmind script is Initialized ( MouseTools.MouseButtons = MouseTools.MOUSEBUTTONS(LMB) ). To fix that you only need to enable first start button on the python controller which is executing the overmind script.


I completely ignored the camera sensors and thought that no errors would occur if I did not include them. Well, it appears that I was wrong…

Anyway, Your method of running the overmind script first worked, and I now receive no errors when running my demo.

Thanks a lot!