Skip to content

'Event' object has no attribute 'button' #1

@CrsiX

Description

@CrsiX

I downloaded and started visgraph_simulator as mentioned in the README file.

After some experimenting with the UI and drawing some obstacles, I entered the S mode. I set the start point and then tried to move around with the end points by holding down the right mouse key. The "game" crashed almost instantly.
I retried this procedure with only two obstacles and by clicking instead of holding down the mouse. Same consequence.

Traceback:

pygame 1.9.5
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
  File "visgraph_simulator/visgraph_simulator.py", line 237, in <module>
    game_loop()
  File "visgraph_simulator/visgraph_simulator.py", line 193, in game_loop
    if pygame.mouse.get_pressed()[LEFT-1] or event.button == LEFT:
AttributeError: 'Event' object has no attribute 'button'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions