# SHAPER\_CALIBRATE internal error after update

**URL:** <https://klipper.discourse.group/t/shaper-calibrate-internal-error-after-update/23420>\
**Category:** General Discussion\
**Created:** [May 13, 2025, 1:19pm UTC](https://klipper.discourse.group/t/shaper-calibrate-internal-error-after-update/23420 "2025-05-13T13:19:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![crysxd](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/crysxd/32/7552_2.png) [@crysxd](https://klipper.discourse.group/u/crysxd)\
**Post date:** [May 13, 2025, 1:19pm UTC](https://klipper.discourse.group/t/shaper-calibrate-internal-error-after-update/23420/1 "2025-05-13T13:19:16Z")

</div>

### Basic Information:

Printer Model: Voron 2.4  
 MCU / Printerboard: BTT M8P / EBB 2209 RP2040  
 Host / SBC: BTT CB1  
 klippy.log [klippy.log](https://klipper.discourse.group/uploads/short-url/5otAbTdRnw7Oz2U7dmWj7XZTgu4.log) (3.3 MB)

### Describe your issue:

I updated from `v0.13.0-87-gfd55dd9e` to `v0.13.0-110-g1af219fa` to a avoid [this bug](https://klipper.discourse.group/t/issues-with-stepper-drift-on-latest-klipper/23304/6) but with the new version `SHAPER_CALIBRATE` no longer works. The printer moves to the XY position and then Klipper crashes immediately.

Downgrading Klipper to the previous version (without reflashing theM MCUs, so they still run 110) solves this issue, so this seems to me like a bug recently introduced.

```auto
Testing axis x
ADXL345 starting 'adxl345' measurements
Internal error on command:"SHAPER_CALIBRATE"
Traceback (most recent call last):
  File "/home/biqu/klipper/klippy/gcode.py", line 212, in _process_commands
    handler(gcmd)
  File "/home/biqu/klipper/klippy/gcode.py", line 140, in <lambda>
    func = lambda params: origfunc(self._get_extended_params(params))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/biqu/klipper/klippy/extras/resonance_tester.py", line 373, in cmd_SHAPER_CALIBRATE
    calibration_data = self._run_test(gcmd, calibrate_axes, helper,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/biqu/klipper/klippy/extras/resonance_tester.py", line 265, in _run_test
    self.executor.run_test(test_seq, axis, gcmd)
  File "/home/biqu/klipper/klippy/extras/resonance_tester.py", line 131, in run_test
    X, Y = thpos[:2]
           ^^^^^
NameError: name 'thpos' is not defined
Transition to shutdown state: Internal error on command:"SHAPER_CALIBRATE"

```

---

<div class="post-metadata">

**Author:** ![crysxd](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/crysxd/32/7552_2.png) [@crysxd](https://klipper.discourse.group/u/crysxd)\
**Post date:** [May 13, 2025, 1:42pm UTC](https://klipper.discourse.group/t/shaper-calibrate-internal-error-after-update/23420/2 "2025-05-13T13:42:34Z")

</div>

Commit [`64d6f110a`](https://github.com/Klipper3d/klipper/commit/64d6f110a989a67481927ee6cfb6ae411d28377d) works fine, it breaks with [`307c03e`](https://github.com/Klipper3d/klipper/commit/307c03e4804800ecf5833efe3aa097d91a7fa0e7)

---

<div class="post-metadata">

**Author:** ![crysxd](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/crysxd/32/7552_2.png) [@crysxd](https://klipper.discourse.group/u/crysxd)\
**Post date:** [May 13, 2025, 1:55pm UTC](https://klipper.discourse.group/t/shaper-calibrate-internal-error-after-update/23420/3 "2025-05-13T13:55:34Z")

</div>

I created a PR:

> <https://github.com/Klipper3d/klipper/pull/6930>
>
> This PR solves an issue introduced with 307c03e4804800ecf5833efe3aa097d91a7fa0e7… causing the \`SHAPRE\_CALIBRATE\` command to fail with below error:
> 
> \`\`\`
> Testing axis x
> ADXL345 starting 'adxl345' measurements
> Internal error on command:"SHAPER\_CALIBRATE"
> Traceback (most recent call last):
> File "/home/biqu/klipper/klippy/gcode.py", line 212, in \_process\_commands
> handler(gcmd)
> File "/home/biqu/klipper/klippy/gcode.py", line 140, in \<lambda\>
> func = lambda params: origfunc(self.\_get\_extended\_params(params))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/home/biqu/klipper/klippy/extras/resonance\_tester.py", line 373, in cmd\_SHAPER\_CALIBRATE
> calibration\_data = self.\_run\_test(gcmd, calibrate\_axes, helper,
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/home/biqu/klipper/klippy/extras/resonance\_tester.py", line 265, in \_run\_test
> self.executor.run\_test(test\_seq, axis, gcmd)
> File "/home/biqu/klipper/klippy/extras/resonance\_tester.py", line 131, in run\_test
> X, Y = thpos\[:2\]
> ^^^^^
> NameError: name 'thpos' is not defined
> Transition to shutdown state: Internal error on command:"SHAPER\_CALIBRATE"
> \`\`\`
> 
> I renamed everything \`thpos\` to be consistent with \[klippy/extras/homing.py\](https://github.com/Klipper3d/klipper/blob/1af219fad6c2abda1eadbd4c48ad541110100f4c/klippy/extras/homing.py#L73)

---

<div class="post-metadata">

**Author:** ![3DSmitty](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/3dsmitty/32/19030_2.png) [@3DSmitty](https://klipper.discourse.group/u/3DSmitty)\
**Post date:** [May 15, 2025, 8:57pm UTC](https://klipper.discourse.group/t/shaper-calibrate-internal-error-after-update/23420/4 "2025-05-15T20:57:52Z")

</div>

Same thing is happening to me when TEST\_RESONANCES

```auto
NameError: name 'thpos' is not defined
Transition to shutdown state: Internal error on command:"TEST_RESONANCES"

```

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [May 16, 2025, 9:22am UTC](https://klipper.discourse.group/t/shaper-calibrate-internal-error-after-update/23420/5 "2025-05-16T09:22:10Z")

</div>

> [@3DSmitty](#):
>
> Same thing is happening to me when TEST\_RESONANCES
> 
> ```auto
> 
> ```

Update to latest Git. Should be fixed via [resonance\_tester: Fix typo · Klipper3d/klipper@ed36041 · GitHub](https://github.com/Klipper3d/klipper/commit/ed36041b67e8bbbacae0710af8c4a5e4ffc030fa)

---

<div class="post-metadata">

**Author:** ![3DSmitty](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/3dsmitty/32/19030_2.png) [@3DSmitty](https://klipper.discourse.group/u/3DSmitty)\
**Post date:** [May 16, 2025, 10:30am UTC](https://klipper.discourse.group/t/shaper-calibrate-internal-error-after-update/23420/6 "2025-05-16T10:30:49Z")

</div>

Awesome, Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [July 15, 2025, 10:31am UTC](https://klipper.discourse.group/t/shaper-calibrate-internal-error-after-update/23420/7 "2025-07-15T10:31:29Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
