Advertisement
johnmahugu

pyhook error in base64 bit running 32bitpy2.7.0

May 27th, 2016
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.78 KB | None | 0 0
  1. I do not have this problem when I monitor KeyDown but I do have it when I monitor KeyUp. I'm on Vista x64.
  2. Python2.6.2\lib\site-packages\pyHook\HookManager.py:350: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
  3. func = self.keyboard_funcs.get(msg)
  4. Traceback (most recent call last):
  5. File "...\Python2.6.2\lib\site-packages\pyHook\HookManager.py", line 3
  6. 50, in KeyboardSwitch
  7. func = self.keyboard_funcs.get(msg)
  8. TypeError: an integer is required
  9.  
  10. Link
  11. Matt Shaw
  12. Matt Shaw
  13. 2010-08-08
  14. msg is definitely an int according to type() but it's still throwing this error. My hunch is that the int is 64-bit, but this is a bit over my head. My hack was to change line 349 in HookManager:
  15. func = self.keyboard_funcs.get(msg)
  16. to:
  17. func = self.keyboard_funcs.get( int(str(msg)) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement