Skip to content

[Bug] EV3 Motor Detection is incomplete #2536

@laurensvalk

Description

@laurensvalk

Originally posted by @KhuongAnNguyen January 6, 2026

Hello. I am using the nightly build ev3-firmware-4563 (30-December-2025) on the latest Raspberry Pi Trixie OS.

The program compiled and ran; but sometimes gave random OSError when controlling the medium EV3 servo. For example:

  1. OSError: [Errno 1] EPERM: The requested operation is not valid in the current state.
    motor.run_target(speed=1000, target_angle=-150*2, wait=True)
    print(motor.angle())
    wait(1000)
    motor.run_target(speed=1000, target_angle=0, wait=True) # This line triggers the error
  2. OSError: [Errno 19] ENODEV: A sensor or motor is not connected to the specified port.
    ev3 = EV3Brick()
    motor = Motor(Port.D) # This line triggers the error
    I double-checked the cable, changed the port. Same issue from time to time.
    If I add "wait(200)" before the motor initialisation, the error seemed to appear less frequently.

What was really strange is that the exact same code ran 50% of the time, but randomly gave up with the above error.

Please help advise me. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: EV3Issues related to LEGO MINDSTORMS EV3software: pybricks-micropythonIssues with Pybricks MicroPython firmware (or EV3 runtime)topic: motorsIssues involving motors

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions