pyVNC icon indicating copy to clipboard operation
pyVNC copied to clipboard

unsupported operand type(s) for &: 'str' and 'int'

Open alex2304 opened this issue 5 years ago • 7 comments

Hi! I've tried to run example from the README file, but it fails with the following:

  File "../lib/python3.6/site-packages/twisted/python/log.py", line 103, in callWithLogger
    return callWithContext({"system": lp}, func, *args, **kw)
  File "../lib/python3.6/site-packages/twisted/python/log.py", line 86, in callWithContext
    return context.call({ILogContext: newCtx}, func, *args, **kw)
  File "../lib/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "../lib/python3.6/site-packages/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
--- <exception caught here> ---
  File "../lib/python3.6/site-packages/twisted/internet/selectreactor.py", line 149, in _doReadOrWrite
    why = getattr(selectable, method)()
  File "../lib/python3.6/site-packages/twisted/internet/tcp.py", line 243, in doRead
    return self._dataReceived(data)
  File "../lib/python3.6/site-packages/twisted/internet/tcp.py", line 249, in _dataReceived
    rval = self.protocol.dataReceived(data)
  File "../recognition/pyVNC/rfb.py", line 494, in dataReceived
    self._handler()
  File "../recognition/pyVNC/rfb.py", line 504, in _handle_expected
    self._expected_handler(block, *self._expected_args, **self._expected_kwargs)
  File "../recognition/pyVNC/rfb.py", line 163, in _handle_vnc_auth
    self.vnc_request_password()
  File "../recognition/pyVNC/RFBToGUI.py", line 45, in vnc_request_password
    self.send_password(self.factory.password)
  File "../recognition/pyVNC/rfb.py", line 169, in send_password
    des = RFBDes(pw)
  File "../recognition/pyVNC/pyDes.py", line 410, in __init__
    self.setKey(key)
  File "../recognition/pyVNC/rfb.py", line 649, in setKey
    super(RFBDes, self).setKey(newkey)
  File "../recognition/pyVNC/pyDes.py", line 415, in setKey
    self.__create_sub_keys()
  File "../recognition/pyVNC/pyDes.py", line 463, in __create_sub_keys
    key = self.__permutate(des.__pc1, self.__String_to_BitList(self.getKey()))
  File "../recognition/pyVNC/pyDes.py", line 429, in __String_to_BitList
    if ch & (1 << i) != 0:
builtins.TypeError: unsupported operand type(s) for &: 'str' and 'int'```

Are you going to support the library furthermore?

alex2304 avatar Mar 25 '19 13:03 alex2304