micropython-async
micropython-async copied to clipboard
ImportError: no module named 'primitives'
Hello,
I am having an issue using the primitives modules. I get the 'ImportError: no module named 'primitives'' message any time I try to import a primitive. I can import uasyncio and print it's version though, 3,0,0. Any thoughts on what I maybe doing wrong? Keep in mind that I am Very new to programming so its most likely very basic .
Please see the docs for installation instructions.
I just hit this issue as well. Searched around for a while then noticed that instruction in the docs and later found this issue. Can I ask why uasyncio is included in the MicroPython release but this part of it is not?
I guess this question is analogous to asking why are they are in a different package? E.g. why is it from primitives.queue import Queue and not from uasyncio import Queue like the parent asyncio?
The reason is that uasyncio is an official part of MicroPython written by @dpgeorge. This repo is entirely unofficial and maintained by myself. A subset of the primitives aim to replicate those provided with CPython asyncio. I expect that, in due course, official versions of those classes will be written and I will retire my versions.