As the battery value is only set when counter is 128, otherwise it's None, calling __repr__ fails with an format Error: %d format: a number is required, not NoneType
testable with addition in example_export.py:
while headset.running:
try:
packet = headset.dequeue()
if packet is not None:
print packet
except Exception as e:
print e
headset.stop()
time.sleep(0.001)
I would suggest removing the battery value from __repr__
As the battery value is only set when counter is 128, otherwise it's
None
, calling__repr__
fails with an format Error:%d format: a number is required, not NoneType
testable with addition in
example_export.py
:I would suggest removing the battery value from
__repr__