File "main.py", line 70, in
main()
File "main.py", line 47, in main
band.send_alert(ALERT_TYPES.PHONE)
File "/home/pi/Documents/miband/Mi_Band_Raspberry_Pi/auth.py", line 301, in send_alert
char.write(_type)
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 200, in write
return self.peripheral.writeCharacteristic(self.valHandle, val, withResponse)
File "/usr/local/lib/python3.5/dist-packages/bluepy/btle.py", line 542, in writeCharacteristic
self._writeCmd("%s %X %s\n" % (cmd, handle, binascii.b2a_hex(val).decode('utf-8')))
TypeError: a bytes-like object is required, not 'str'
self._writeCmd("%s %X %s\n" % (cmd, handle, binascii.b2a_hex(val).decode('utf-8'))) TypeError: a bytes-like object is required, not 'str