Skip to content

Update mouse-usage.rst because code produces error#587

Open
TDHster wants to merge 1 commit intomoses-palmer:masterfrom
TDHster:patch-1
Open

Update mouse-usage.rst because code produces error#587
TDHster wants to merge 1 commit intomoses-palmer:masterfrom
TDHster:patch-1

Conversation

@TDHster
Copy link
Copy Markdown

@TDHster TDHster commented Feb 15, 2024

Main problem was that event may not have attribute .button as the error indicates.

mouse.Events() can have 3 main types: pynput.mouse.Events.Click, pynput.mouse.Events.Move and pynput.mouse.Events.Scroll (as far as I know)

And among those three, last two of those do not have attribute .button surely.

So if we want to handle this problem, I guess we need to use exception handling.

https://stackoverflow.com/questions/73543563/attributeerror-move-object-has-no-attribute-button-mouse-listener-with-pyn

Main problem was that event may not have attribute .button as the error indicates.

mouse.Events() can have 3 main types: pynput.mouse.Events.Click, pynput.mouse.Events.Move and pynput.mouse.Events.Scroll (as far as I know)

And among those three, last two of those do not have attribute .button surely.

So if we want to handle this problem, I guess we need to use exception handling.


https://stackoverflow.com/questions/73543563/attributeerror-move-object-has-no-attribute-button-mouse-listener-with-pyn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant