Replies: 2 comments 2 replies
-
This confused me a bit when I first looked at it, a file called I think it all should work fine after using |
Beta Was this translation helpful? Give feedback.
-
@pn2new I also always compile all my python source files to |
Beta Was this translation helpful? Give feedback.
-
I am developing an application for an ESP32 target and ran into the following problem:
Usually, I compile packages using
mpy-cross
before uploading them to the target. Now, I did this with a package that loaded another one. Specifically, it was this file:https://github.com/miguelgrinberg/microdot/blob/main/src/microdot/utemplate.py. In the first code line, it loads another package:
When loading this library from my application, I always got an error message saying that 'recompile' was unknown in line 14 (which is the line with
loader_class=recompile.Loader
). It took me ages to find out that everything worked fine when I used the.py
files instead of the.mpy
files.So it seems that during
mpy-cross
the code from the import was not included.My question now is:
mpy-cross
in this situation? Did I possibly miss an option to 'include' the content of the package that is loaded ?Beta Was this translation helpful? Give feedback.
All reactions