Closed burlapsax closed 4 years ago
Thank you for the detailed report. The error seems like it might be fixed in a relatively short time and no harm done in freezing it to a working version, so let's merge this. Thanks!
Awesome, thank you @joukos !
TL;DR: There is a known issue in
vncdotool
version1.0.0
which breaks the password functionality. This PR would lock that dependency in our virtualenv to the previous working version0.13.0
.Expected behavior: When setting a VNC password, I should be able to connect with
papertty.py vnc --password <password>
.Actual behavior: There is an Unhandled Error from
vncdotool
and the connection is never completed.Steps to reproduce:
mkvirtualenv -p /usr/bin/python3 -r requirements.txt papertty
3B
as an example) and allow it to be saved to~/.vnc/passwd
.x11vnc -localhost -shared -usepw -display :0 -forever -bg
sudo ~/.virtualenvs/papertty/bin/python3 papertty.py --driver epd4in2 vnc --display 0 --sleep 0.01 --password 3B
and observe the following output:Unhandled Error Traceback (most recent call last): File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/twisted/python/log.py", line 103, in callWithLogger return callWithContext({"system": lp}, func, *args, kw) File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/twisted/python/log.py", line 86, in callWithContext return context.call({ILogContext: newCtx}, func, *args, *kw) File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/twisted/python/context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, args, kw) File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/twisted/python/context.py", line 85, in callWithContext return func(*args,*kw) --- ---
File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/twisted/internet/tcp.py", line 243, in doRead
return self._dataReceived(data)
File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/twisted/internet/tcp.py", line 249, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/vncdotool/rfb.py", line 685, in dataReceived
self._handler()
File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/vncdotool/rfb.py", line 694, in _handleExpected
self._expected_handler(block, self._expected_args, **self._expected_kwargs)
File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/vncdotool/rfb.py", line 255, in _handleVNCAuth
self.vncRequestPassword()
File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/vncdotool/client.py", line 375, in vncRequestPassword
self.sendPassword(self.factory.password)
File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/vncdotool/rfb.py", line 261, in sendPassword
des = RFBDes(pw)
File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/vncdotool/pyDes.py", line 410, in init
self.setKey(key)
File "/home/pi/.virtualenvs/papertty/lib/python3.5/site-packages/vncdotool/rfb.py", line 835, in setKey
if bsrc & (1 << i):
builtins.TypeError: unsupported operand type(s) for &: 'str' and 'int'