I copied the primitives directory tree and its contents to the ESP32's filesystem as reported here: https://github.com/peterhinch/micropyth ... primitives
but when I try to import the Message class like in this example:
Code: Select all
import uasyncio as asyncio
from primitives.message import Message
async def waiter(msg):
print('Waiting for message')
res = await msg
print('waiter got', res)
msg.clear()
async def main():
msg = Message()
asyncio.create_task(waiter(msg))
await asyncio.sleep(1)
msg.set('Hello') # Optional arg
await asyncio.sleep(1)
asyncio.run(main())
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "primitives/message.py", line 20, in <module>
File "uasyncio/__init__.py", line 1, in __getattr__
AttributeError: ThreadSafeFlag
Anyone can help me? Many thanks