invent-framework / invent

Express yourself with code.
https://invent-framework.github.io/
Apache License 2.0
108 stars 12 forks source link

Calculator example gives ENOENT error with MicroPython #107

Open mhsmith opened 2 weeks ago

mhsmith commented 2 weeks ago

It shows this in the console, but I don't see any indication of what file wasn't found:

{
    "name": "ErrnoError",
    "errno": 44,
    "code": "ENOENT",
    "message": "No such file or directory"
}

Ln @ custom.js:167
await in Ln (async)
define @ custom.js:251
(anonymous) @ core.js:291
Promise.then (async)
(anonymous) @ core.js:164

If I change type="mpy" to type="py", then it works fine.

It looks like this problem was introduced by #104, as the previous main branch commit (7ccfed17458c02ded030545e381da3f90cb8dc6f) works fine.

mhsmith commented 2 weeks ago

Caused by https://github.com/pyscript/pyscript/issues/2035, so should be fixed by upgrading to PyScript 2024.4.2.

mhsmith commented 2 weeks ago

Unfortunately PyScript 2024.4.2 still has some problems with MicroPython and asyncio:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "invent/__init__.py", line 21, in <module>
  File "invent/channels.py", line 21, in <module>
  File "invent/task.py", line 5, in <module>
ImportError: no module named 'asyncio'