Skip to content

mpremote romfs deploy throws exception #17140

@peterhinch

Description

@peterhinch

Port, board and/or hardware

RP2040 (Pi Pico)

MicroPython version

MicroPython v1.25.0-dirty on 2025-04-16; Raspberry Pi Pico with RP2040 Built from today's source with 128KiB romfs enabled.

Python 3.10.12 (main, Feb 4 2025, 14:57:36) [GCC 11.4.0] on linux

Reproduction

$ mpremote romfs deploy fonts.romfs
Image size is 125508 bytes
ROMFS0 partition has size 131072 bytes (32 blocks of 4096 bytes each)
Preparing ROMFS0 partition for writing
Traceback (most recent call last):
  File "/mnt/qnap2/data/Projects/MicroPython/micropython/tools/mpremote/mpremote.py", line 6, in <module>
    sys.exit(main.main())
  File "/mnt/qnap2/data/Projects/MicroPython/micropython/tools/mpremote/mpremote/main.py", line 569, in main
    handler_func(state, args)
  File "/mnt/qnap2/data/Projects/MicroPython/micropython/tools/mpremote/mpremote/commands.py", line 688, in do_romfs
    _do_romfs_deploy(state, args)
  File "/mnt/qnap2/data/Projects/MicroPython/micropython/tools/mpremote/mpremote/commands.py", line 652, in _do_romfs_deploy
    romfs_chunk_compressed = zlib.compress(romfs_chunk, wbits=-9)
TypeError: 'wbits' is an invalid keyword argument for compress()

The CPython docs indicate that wbits is a positional-only arg

Expected behaviour

Expected to deploy the romfs file to an RP2 built with romfs enabled.

Observed behaviour

Threw exception described above.

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtoolsRelates to tools/ directory in source, or other tooling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions