pyVNC icon indicating copy to clipboard operation
pyVNC copied to clipboard

Client.screen.protocol is None

Open MrNom4ik opened this issue 1 year ago • 1 comments

from pygame.locals import K_KP_ENTER
from pyVNC.Client import Client


vnc = Client(host='211.93.21.225', port=5900)
vnc.start()
vnc.send_key(K_KP_ENTER)
vnc.join()
pygame 2.5.0 (SDL 2.28.0, Python 3.8.10)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
  File "C:\Users\User\PycharmProjects\VNCGrubber\VNCGrubber\test.py", line 7, in <module>
    vnc.send_key(K_KP_ENTER)
  File "C:\Users\User\PycharmProjects\VNCGrubber\VNCGrubber\pyVNC\Client.py", line 36, in send_key
    self.screen.protocol.key_event(constants.KEYMAPPINGS[key], down=1)
AttributeError: 'NoneType' object has no attribute 'key_event'

python==3.8.10 pyVNC==0.1 pygame==2.5.0 Twisted==22.10.0 numpy==1.24.3

MrNom4ik avatar Jul 04 '23 17:07 MrNom4ik