← index #18705Issue #16136
Related · high · value 1.896
QUERY · ISSUE

mpremote mip install can create a folder named `:`

openby Josverlopened 2026-01-21updated 2026-01-21
bugtools

Port, board and/or hardware

ESP32 , but can be any

MicroPython version

mpremote v1.27.0

Reproduction

PS D:\mypython\mp_wcwidth> mpremote --version
mpremote 1.27.0
PS D:\mypython\mp_wcwidth>  mpremote mip install --target : github:josverl/mp_wcwidth/demo.py
Install github:josverl/mp_wcwidth/demo.py
Downloading github:josverl/mp_wcwidth/demo.py to :
Installing: :/demo.py
Done
PS D:\mypython\mp_wcwidth> mpremote tree
tree :
:/
└── :
    └── demo.py

Expected behaviour

Expected that :

  • the : prefix for "remote" would not be used as the path
  • the demo.py file would be created in the cwd of the MCU
  • nu folder named : would be created

Observed behaviour

PS D:\mypython\mp_wcwidth> mpremote tree
tree :
:/
└── :
    └── demo.py

Additional Information

Similar issues with specifying '--target :.'

tree :
:/
├── :
│   └── demo.py
├── :.
│   └── demo.py
└── demo.py

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

'mpremote mip install' fails if lib folder does not exist

closedby mattytrentiniopened 2024-11-02updated 2024-11-03
bugtools

Port, board and/or hardware

Adafruit Qt Py SAMD

MicroPython version

I believe any board with an empty filesystem will exhibit the issue.

Reproduction

$mpremote mip install neopixel

Expected behaviour

$mpremote mip install neopixel
Install neopixel
Installing neopixel (latest) from https://micropython.org/pi/v2 to /lib
Installing: /lib/neopixel.mpy
Done

Observed behaviour

$mpremote mip install neopixel
Install neopixel
Installing neopixel (latest) from https://micropython.org/pi/v2 to /lib
Installing: /lib/neopixel.mpy
Traceback (most recent call last):
  File "/usr/local/bin/mpremote", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/mpremote/main.py", line 538, in main
    handler_func(state, args)
  File "/usr/local/lib/python3.11/dist-packages/mpremote/mip.py", line 166, in do_mip
    _install_package(
  File "/usr/local/lib/python3.11/dist-packages/mpremote/mip.py", line 133, in _install_package
    _install_json(transport, package, index, target, version, mpy)
  File "/usr/local/lib/python3.11/dist-packages/mpremote/mip.py", line 94, in _install_json
    _download_file(transport, file_url, fs_target_path)
  File "/usr/local/lib/python3.11/dist-packages/mpremote/mip.py", line 69, in _download_file
    _ensure_path_exists(transport, dest)
  File "/usr/local/lib/python3.11/dist-packages/mpremote/mip.py", line 29, in _ensure_path_exists
    if not transport.fs_exists(prefix):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/mpremote/transport.py", line 100, in fs_exists
    self.fs_stat(src)
  File "/usr/local/lib/python3.11/dist-packages/mpremote/transport.py", line 96, in fs_stat
    raise _convert_filesystem_error(e, src) from None
  File "/usr/local/lib/python3.11/dist-packages/mpremote/transport.py", line 94, in fs_stat
    return os.stat_result(self.eval("os.stat(%s)" % ("'%s'" % src)))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/mpremote/transport_serial.py", line 259, in eval
    ret = self.exec("print(repr({}))".format(expression))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/mpremote/transport_serial.py", line 270, in exec
    raise TransportExecError(ret, ret_err.decode())
mpremote.transport.TransportExecError: Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: 2

Additional Information

$mpremote --version
mpremote 1.24.0

A workaround is to create the lib directory and reinstall:

$mpremote mkdir :lib
$mpremote mip install neopixel
Install neopixel
Installing neopixel (latest) from https://micropython.org/pi/v2 to /lib
Installing: /lib/neopixel.mpy
Done

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied