ratcashdev / mitemp

Xiaomi MI Temperature and Humidity Sensor with BLE and LCD
MIT License
106 stars 27 forks source link

Bluepy crash occourrences #14

Open mauringo opened 4 years ago

mauringo commented 4 years ago

while using your code the script crashes (usually after 10-14H) leaving this error.

Exception ignored in: <function _BackendConnection.__del__ at 0x7575bd68> Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/base.py", line 55, in __del__ self._cleanup() File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/base.py", line 59, in _cleanup self._backend.disconnect() File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/bluepy.py", line 26, in _func_wrapper return func(*args, **kwargs) File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/bluepy.py", line 63, in disconnect self._peripheral.disconnect() File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 453, in disconnect self._writeCmd("disc\n") File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 305, in _writeCmd self._helper.stdin.flush() BrokenPipeError: [Errno 32] Broken pipe Exception ignored in: <function BluetoothInterface.__del__ at 0x7575bbb8> Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/base.py", line 17, in __del__ self._backend.disconnect() File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/bluepy.py", line 26, in _func_wrapper return func(*args, **kwargs) File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/bluepy.py", line 63, in disconnect self._peripheral.disconnect() File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 453, in disconnect self._writeCmd("disc\n") File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 305, in _writeCmd self._helper.stdin.flush() BrokenPipeError: [Errno 32] Broken pipe Exception ignored in: <function Peripheral.__del__ at 0x7563be88> Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 630, in __del__ self.disconnect() File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 453, in disconnect self._writeCmd("disc\n") File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 305, in _writeCmd self._helper.stdin.flush() BrokenPipeError: [Errno 32] Broken pipe