Open dclaar opened 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.
https://docs.micropython.org/en/latest/library/uselect.html
Example with socket here
Refs: https://esp32.com/viewtopic.php?t=10295