peterhinch/micropython-async

asyncio.get_event_loop() is not attribute time()

Closed this issue · 2 comments

File "aremote.py", line 80, in _cb_pin
AttributeError: type object 'Loop' has no attribute 'time'

79 loop = asyncio.get_event_loop()
80 self._ev_start.set(loop.time()) # asyncio latency compensation

import uasyncio as asyncio
obj = asyncio.get_event_loop()
dir(obj)
['class', 'module', 'name', 'qualname', 'close', 'stop', 'bases', 'dict', 'create_task', 'run_until_complete', 'call_exception_handler', '_exc_handler', 'run_forever', 'set_exception_handler', 'get_exception_handler', 'default_exception_handler']

no time

You are running the V2 driver with V3 uasyncio. Please run this version. Note that it is now a Python package: see the docs.

Thanks, Additionally I added the primitives library and the art.py test worked.