Skip to content

[Bug] Klipper v0.13.0+ Compatibility: AttributeError: module 'extras.manual_probe' has no attribute 'ProbeResult' #248

@apollo-mg

Description

@apollo-mg

System:

  • Klipper Version: v0.13.0+ (verified on v0.13.0-347-g3fe594ef)
  • BDsensor Version: Latest (f03a27e)

Problem:
Recent versions of Klipper have refactored the probe handling logic. The manual_probe.ProbeResult class has been removed. Klipper now expects probe results to be simple unpackable sequences (tuples or lists) of (x, y, z).

The current BDsensor.py fails in two ways:

  1. AttributeError: It tries to access manual_probe.ProbeResult, which no longer exists.
    AttributeError: module 'extras.manual_probe' has no attribute 'ProbeResult'
  2. ValueError (if patched incorrectly): If ProbeResult is manually defined as a class without iterable support, z_tilt.py crashes because it tries to unpack x, y, z = pos.
    ValueError: too many values to unpack (expected 3)

Fix:
The ProbeResult class should be defined locally within BDsensor.py (since it's gone from Klipper) and must inherit from list (or be a tuple) to support unpacking, while maintaining attribute access for internal BDsensor logic.

Working Patch:
In BDsensor.py, replace the import logic with:

python try: ProbeResult = manual_probe.ProbeResult except AttributeError: class ProbeResult(list): def __init__(self, bed_x, bed_y, bed_z, probe_x=None, probe_y=None, probe_z=None): # Initialize as list [x, y, z] to satisfy Klipper unpacking super().__init__([bed_x, bed_y, bed_z]) # Keep attributes for BDsensor internal usage self.bed_x = bed_x self.bed_y = bed_y self.bed_z = bed_z self.probe_x = probe_x self.probe_y = probe_y self.probe_z = probe_z

I have verified this fix works on my machine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions