One more thing: uasyncio isn't in the MicroPython 1.14 I downloaded: I need to install it:enzo wrote: ↑Sun Feb 07, 2021 7:57 pmSame problem with last unstable:enzo wrote: ↑Sun Feb 07, 2021 7:48 pmI'll give it a try and let you know.kevinkk525 wrote: ↑Sun Feb 07, 2021 7:27 pmthat's right. Looks like you're doing it correctly.
You could try the daily firmware until we can find out whats happening (assuming the daily firmware has uasyncio v3 which I assume it does).Code: Select all
MicroPython v1.14-9-g9dedcf122 on 2021-02-07; ESP module (1M) with ESP8266 Type "help()" for more information. >>> %Run -c $EDITOR_CONTENT Traceback (most recent call last): File "<stdin>", line 20, in <module> AttributeError: 'module' object has no attribute 'run'
I see there's a "uasyncio" method in "uasyncio" module so I tried:Code: Select all
>>> import uasyncio >>> dir(uasyncio) ['__class__', '__name__', '__path__', 'log', 'select', 'sleep', 'sleep_ms', 'time', 'ucollections', 'uerrno', 'utimeq', 'DEBUG', 'uasyncio', '_socket', 'core', 'set_debug', 'PollEventLoop', 'EventLoop', 'StreamReader', 'IORead', 'IOReadDone', 'StreamWriter', 'IOWrite', 'IOWriteDone', 'open_connection', 'start_server', 'type_gen', 'CancelledError', 'TimeoutError', 'SysCall1', 'SleepMs', 'StopLoop', 'SysCall', 'get_event_loop', 'cancel', 'TimeoutObj', 'wait_for_ms', 'wait_for', 'coroutine', 'ensure_future', 'Task'] >>>
but no success.Code: Select all
>>> uasyncio.uasyncio.run() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'run' >>>
Code: Select all
>>> upip.install("uasyncio")
Installing to: /lib/
Warning: micropython.org SSL certificate is not validated
Installing uasyncio 2.0 from https://micropython.org/pi/uasyncio/uasyncio-2.0.tar.gz
Installing micropython-uasyncio.core 2.0 from https://micropython.org/pi/uasyncio.core/uasyncio.core-2.0.tar.gz