Skip to content

[Bug] Pybricks Tools --slot parameter #2890

Open

Description

@KWSmit

Describe the bug
When I use parameter --slot in the run command like pb run --slot 1 script.py, I would suspect it will upload the program to slot 1 on the hub, regardless of which slot is selected on the hub. But if the slot selected on the hub doesn't match the slot of the --slot parameter you get an error message:

The hub has slot 2 selected, and a program can only be downloaded into the selected slot.
The hub chooses the slot, with the buttons on the hub itself. Select it there, or leave --slot out to accept the one it has.

Is this a bug or a feature? 😄
If it's meant to be this way, what is the use case for this parameter?

To reproduce

  1. Select slot 2 on the hub.
  2. On the command-line run pb run --slot 1 script.py

Expected behavior
Use the slot given with the --slot parameter, regardless of the slot selected on the hub.

Activity

  1. added
    triage
    on Nov 5, 2026
  2. laurensvalk commented on Nov 5, 2026

    @laurensvalk
    Member

    Thank you. Slots need to be revisited extensively on the firmware side to make this more generic. It may be a while before we get to that.

  3. removed
    triage
    on Nov 5, 2026
  4. KWSmit commented on Nov 5, 2026

    @KWSmit
    SponsorAuthor

    No problem if it takes a while. I'm already very happy with this command-line tool.

    While you're at it, also check the numbering of the slots. The first slot on the hub corresponds tot --slot 0. I don't think that's very convenient, most people would expect --slot 1 to correspond with the first slot selected on the hub. Especially on the EV3, where on the display the slots are numbered 1 to 4.

  5. added
    software: pybricks-tools
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    software: pybricks-tools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions