microdot icon indicating copy to clipboard operation
microdot copied to clipboard

File "microdot.py", line 25 SyntaxError: invalid syntax

Open QGB opened this issue 3 years ago • 3 comments

>>> import microdot
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "microdot.py", line 25
SyntaxError: invalid syntax

upip install to /Lib/src ,so I directly save https://github.com/miguelgrinberg/microdot/blob/main/src/microdot.py to esp32c3 board

QGB avatar Sep 29 '22 10:09 QGB

What do you have in line 25 of microdot.py? Do not look in github please, look in the copy of the file that was installed on your device.

miguelgrinberg avatar Sep 29 '22 12:09 miguelgrinberg

@miguelgrinberg

import upip
upip.install('microdot')

it is the correct way to install microdot in esp32 board?

QGB avatar Oct 06 '22 09:10 QGB

@QGB This is what I have in the documentation wrt installation:

For MicroPython, you can install it with upip if that option is available, but the recommended approach is to manually copy microdot.py and any desired optional extension source files from the GitHub repository into your device, possibly after compiling them to .mpy files. These source files can also be frozen and incorporated into a custom MicroPython firmware.

I don't use upip, and besides, it is getting replaced with a different tool called mip. I suggest you copy the files that you need manually, if possible after compiling them with mpy-cross so that they are smaller.

miguelgrinberg avatar Oct 06 '22 09:10 miguelgrinberg