Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse Library Overflow Error #137

Closed
maxdule opened this issue Oct 15, 2018 · 12 comments
Closed

Mouse Library Overflow Error #137

maxdule opened this issue Oct 15, 2018 · 12 comments

Comments

@maxdule
Copy link

maxdule commented Oct 15, 2018

On every execution following log displayed:

C:\Program Files\Python37\lib\site-packages\lackey\InputEmulation.py:8: DeprecationWarning: The mouse sub-library is deprecated and will be removed in future versions. Please use the standalone package mouse.
from keyboard import mouse
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:\Program Files\Python37\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\Program Files\Python37\lib\threading.py", line 865, in run
self._target(*self._args, **self.kwargs)
File "C:\Program Files\Python37\lib\site-packages\keyboard_init
.py", line 292, in listen
_os_keyboard.listen(self.direct_callback)
File "C:\Program Files\Python37\lib\site-packages\keyboard_winkeyboard.py", line 560, in listen
prepare_intercept(callback)
File "C:\Program Files\Python37\lib\site-packages\keyboard_winkeyboard.py", line 553, in prepare_intercept
keyboard_hook = SetWindowsHookEx(WH_KEYBOARD_LL, keyboard_callback, GetModuleHandleW(NULL), NULL)
ctypes.ArgumentError: argument 3: <class 'OverflowError'>: int too long to convert

@glitchassassin
Copy link
Owner

What version of keyboard do you have installed?

@glitchassassin
Copy link
Owner

I don't htink this is related to the mouse deprecation warning, but it does appear to be coming from the keyboard module.

@maxdule
Copy link
Author

maxdule commented Nov 13, 2018

What version of keyboard do you have installed?

It's 0.13.2

@glitchassassin
Copy link
Owner

Hmm. I'm not seeing the same error on my end. What version of Windows?

@maxdule
Copy link
Author

maxdule commented Nov 13, 2018

Win 10, 1803 version

@maxdule
Copy link
Author

maxdule commented Nov 13, 2018

But these warnings do exist in mouse.py within keyboard.

Lines 2, 3 & 4

import warnings

warnings.simplefilter('always', DeprecationWarning)

warnings.warn('The mouse sub-library is deprecated and will be removed in future versions. Please use the standalone package mouse.', DeprecationWarning, stacklevel=2)

@glitchassassin
Copy link
Owner

Yes, that appears, but doesn't cause the subsequent crash; it's the ArgumentError I'm concerned about.

@glitchassassin
Copy link
Owner

I am unable to duplicate this issue so far. Does it happen after just import lackey?

@glitchassassin
Copy link
Owner

(To be clear, the mouse deprecation warning is being tracked in #127, I'm here investigating the ctypes.ArgumentError crash.)

@glitchassassin
Copy link
Owner

I take that back! I have successfully replicated the error. Investigating further.

@jemiele1
Copy link

I did some investigating...

This is a known issue in keyboard. See issue 186. The version of file _winkeyboard.py in the keyboard master branch has been modified to correct this problem. I was able to patch _winkeyboard.py for keyboard and the error for importing lackey disappeared!

@glitchassassin
Copy link
Owner

This has been fixed in the master branch of the keyboard library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants