pfalcon / utemplate

Micro template engine in Python with low memory usage, designed for Pycopy, a minimalist Python dialect, but also compatible with other Pythons.
https://github.com/pfalcon/pycopy
76 stars 8 forks source link

no module named utemplate #18

Open slim-s opened 1 year ago

slim-s commented 1 year ago

im trying to run this code: https://github.com/donskytech/micropython-wifi-robot-car

I am getting an error: ImporErrpr: no module named utemplate. I have installed all the required libraries and tried it on multiple systems, yet this problem persists. I think i am still missing something, please help me through it.

helmuter commented 2 weeks ago

I ran into the similar problem in my micropython project. The error is caused by the first line of the module utemplate, it tries to import itself: from utemplate import recompile I do not know if this can work at all, this looks like a recursion to me. But it is the original code from micropython at github: https://github.com/miguelgrinberg/microdot/blob/main/src/microdot/utemplate.py - so it must be my lack of understanding.

helmuter commented 2 weeks ago

Now I found a solution. There is - very tricky - another module called utemplate, and you have to install it additionally to the microdot package. My code runs now.