aydinnyunus / Keylogger

Get Keyboard,Mouse,ScreenShot,Microphone Inputs from Target Computer and Send to your Mail.
Apache License 2.0
2.08k stars 442 forks source link

"NameError: name 'keyboard' is not defined" 😬. what to do? #37

Open charan-24 opened 1 year ago

charan-24 commented 1 year ago

Getting an Error like this:

Traceback (most recent call last):
  File "/workspace/Keylogger/keylogger.py", line 144, in <module>
    keylogger.run()
  File "/workspace/Keylogger/keylogger.py", line 116, in run
    keyboard_listener = keyboard.Listener(on_press=self.save_data)
NameError: name 'keyboard' is not defined

What to do?

aydinnyunus commented 1 year ago

can you install requirements.txt and try again ? I updated the requirements.txt

charan-24 commented 1 year ago

Yes, I have Installed "pillow" module also Pillow in /workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages (9.3.0)

But got the same error on "keyboard" as mentioned earlier.

CrippledToenail commented 1 year ago

Same

Heyiamslice commented 1 year ago

maybe this could help https://bobbyhadz.com/blog/python-no-module-named-keyboard

Reavx commented 1 year ago

Getting an Error like this:

Traceback (most recent call last):
  File "/workspace/Keylogger/keylogger.py", line 144, in <module>
    keylogger.run()
  File "/workspace/Keylogger/keylogger.py", line 116, in run
    keyboard_listener = keyboard.Listener(on_press=self.save_data)
NameError: name 'keyboard' is not defined

What to do?

hey men what did u do u solve that problem?

psusmit commented 1 year ago

On line 116 this error occured, but if we check in import we have Listener so try replacing the line with: keyboard_listener = Listener(on_press=self.save_data) Also try import this statement on line 115 just before it: from pynput.keyboard import Listener

mikethemelon commented 11 months ago

Maybe bc you doesn't have all the requirements, try to pip install every library is needed by manual

lAnviuml commented 5 months ago

I have the same thing Traceback (most recent call last): File "P:\My Documents\keylogger\Keylogger-master\Keylogger-master\keylogger.py", line 143, in <module> keylogger.run() File "P:\My Documents\keylogger\Keylogger-master\Keylogger-master\keylogger.py", line 115, in run keyboard_listener = Listener(on_press=self.save_data) ^^^^^^^^ NameError: name 'Listener' is not defined