Closed mariansauter closed 5 months ago
Hi Marian,
Could it be that the error is actually in the unpacking you do in (click_x, click_y)
? I think the function might be returning None
instead of a coordinate upon a timeout. The timeout
keyword you added will have made this behaviour obvious, but isn't to blame directly.
I'd recommend changing it to the following:
button, click_pos, timestamp = my_mouse.get_click(timeout=3000)
if click_pos is None:
click_x = None
click_y = None
else:
click_x, click_y = click_pos
Cheers, Edwin
Yes of course. I don't know how I didn't see that. Thanks Edwin.
The error references the line in which I try to collect mouseclicks with
button, (click_x, click_y), timestamp = my_mouse.get_click(timeout=3000)
Error
This happens in a python inline script regardless of the selected backend. Collecting clicks works fine without timeout keyword.