dclaar / purple_air

Code for displaying Air Quality from a Purple Air device
MIT License
6 stars 4 forks source link

Device freezes with GTK 1 is already in use #16

Open dclaar opened 3 years ago

dclaar commented 3 years ago
wpa: GTK 1 is already in use in entry 3, it may be an attack, ignore it.

Refs: https://esp32.com/viewtopic.php?t=10295

dclaar commented 3 years ago
Traceback (most recent call last):
  File "main.py", line 56, in <module>
  File "main.py", line 47, in main
  File "aqi.py", line 362, in Run
  File "aqi.py", line 320, in GetData
  File "m5stickc.py", line 246, in GetURI
  File "nurequests.py", line 28, in text
  File "nurequests.py", line 20, in content
KeyboardInterrupt:
MicroPython v1.12-574-ge2b117096-dirty on 2020-06-05; M5Stick with ESP32
    @property
    def content(self):
        if self._cached is None:
            try:
                self._cached = self.raw.read()     <<<<

So read needs a timeout.

dclaar commented 3 years ago

https://docs.micropython.org/en/latest/library/uselect.html

Example with socket here