[PyQt] Strange error with QtBluetooth.QLowEnergyService
    s.achterop at rug.nl 
    s.achterop at rug.nl
       
    Thu Nov  7 13:43:00 GMT 2019
    
    
  
   Hello list,
I am working on a BLE app on PyQt5 and am getting an error I don't understand.
With the following snippet:
    from PyQt5 import QtBluetooth as QtBt
    QtBt.QLowEnergyService.writeCharacteristic(QtBt.QLowEnergyCharacteristic.Unknown, 'asdf')
I get the following error:
   TypeError: writeCharacteristic(self, QLowEnergyCharacteristic, Union[QByteArray, bytes, bytearray], ...
       ... mode: QLowEnergyService.WriteMode = QLowEnergyService.WriteWithResponse): first argument of unbound method must have type 'QLowEnergyService'
But from what I see, the type is correct.
What am doing wrong here?
   Thanks in advance,
      Sietse
    
    
More information about the PyQt
mailing list