# SHAPER\_CALIBRATE and TEST\_RESONANCES fail with error "’ToolHead’ object has no attribute ‘cmd\_M204’"

**URL:** <https://klipper.discourse.group/t/shaper-calibrate-and-test-resonances-fail-with-error-toolhead-object-has-no-attribute-cmd-m204/24589>\
**Category:** General Discussion\
**Created:** [August 14, 2025, 7:35pm UTC](https://klipper.discourse.group/t/shaper-calibrate-and-test-resonances-fail-with-error-toolhead-object-has-no-attribute-cmd-m204/24589 "2025-08-14T19:35:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kellwa](https://avatars.discourse-cdn.com/v4/letter/k/ec9cab/32.png) [@Kellwa](https://klipper.discourse.group/u/Kellwa)\
**Post date:** [August 14, 2025, 7:35pm UTC](https://klipper.discourse.group/t/shaper-calibrate-and-test-resonances-fail-with-error-toolhead-object-has-no-attribute-cmd-m204/24589/1 "2025-08-14T19:35:07Z")

</div>

### Basic Information:

Printer Model: Anycubic Kobra Neo  
 MCU / Printerboard: HC32F460  
 Host / SBC : PC  
 klippy.log  
 USB-ADXL345.cfg MCU: stm32f103xe  
 klipper version on both MCU: v0.13.0-210-gd6d858728

### Describe your issue:

I setup an ADXL345 to calibrate shaper , but running either command is failing with this error  
’ToolHead’ object has no attribute ‘cmd\_M204’

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/3X/a/9/a955ed618c97bb6e27bd379e39f607a516d47aab.png)

what I think is the related klippy log part is below  
can you please help resolving the issue ?  
Thanks in advance

> ADXL345 starting ‘adxl345’ measurements
> 
> toolhead: max\_velocity: 500.000000
> 
> max\_accel: 8499.922000
> 
> minimum\_cruise\_ratio: 5.000000
> 
> square\_corner\_velocity: 0.000000
> 
> Disabled [input\_shaper] for resonance testing
> 
> Internal error on command:“SHAPER\_CALIBRATE”
> 
> Traceback (most recent call last):
> 
> File “/home/yazan/klipper/klippy/gcode.py”, line 212, in \_process\_commands
> 
> ```
> handler(gcmd)
> 
> ```
> 
> File “/home/yazan/klipper/klippy/gcode.py”, line 140, in
> 
> ```
> func = lambda params: origfunc(self.\_get_extended_params(params))
> 
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> ```
> 
> File “/home/yazan/klipper/klippy/extras/resonance\_tester.py”, line 373, in cmd\_SHAPER\_CALIBRATE
> 
> ```
> calibration_data = self.\_run_test(gcmd, calibrate_axes, helper,
> 
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> ```
> 
> File “/home/yazan/klipper/klippy/extras/resonance\_tester.py”, line 265, in \_run\_test
> 
> ```
> self.executor.run_test(test_seq, axis, gcmd)
> 
> ```
> 
> File “/home/yazan/klipper/klippy/extras/resonance\_tester.py”, line 151, in run\_test
> 
> ```
> toolhead.cmd_M204(self.gcode.create_gcode_command(
> 
> ^^^^^^^^^^^^^^^^^
> 
> ```
> 
> AttributeError: ‘ToolHead’ object has no attribute ‘cmd\_M204’
> 
> Transition to shutdown state: Internal error on command:“SHAPER\_CALIBRATE”

[klippy.log](https://klipper.discourse.group/uploads/short-url/gM6AfyqbaiablrQMfIxaediIXxs.log) (2.0 MB)

[input\_shaper\_USB-ADXL345.cfg](https://klipper.discourse.group/uploads/short-url/aMQOH8jDqsuJRBOgWn7TeHHOesC.cfg) (381 Bytes)

---

<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:** [August 14, 2025, 8:08pm UTC](https://klipper.discourse.group/t/shaper-calibrate-and-test-resonances-fail-with-error-toolhead-object-has-no-attribute-cmd-m204/24589/2 "2025-08-14T20:08:47Z")

</div>

Already fixed: [resonance\_tester: replace missing M204 call by nefelim4ag · Pull Request #7017 · Klipper3d/klipper · GitHub](https://github.com/Klipper3d/klipper/pull/7017#event-19165442588)

---

<div class="post-metadata">

**Author:** ![Kellwa](https://avatars.discourse-cdn.com/v4/letter/k/ec9cab/32.png) [@Kellwa](https://klipper.discourse.group/u/Kellwa)\
**Post date:** [August 14, 2025, 8:33pm UTC](https://klipper.discourse.group/t/shaper-calibrate-and-test-resonances-fail-with-error-toolhead-object-has-no-attribute-cmd-m204/24589/3 "2025-08-14T20:33:15Z")

</div>

wow that was fast, amazing community and support

now i need to figure out how to update to latest pull request

---

<div class="post-metadata">

**Author:** ![3dcoded](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/3dcoded/32/20297_2.png) [@3dcoded](https://klipper.discourse.group/u/3dcoded)\
**Post date:** [August 15, 2025, 11:49am UTC](https://klipper.discourse.group/t/shaper-calibrate-and-test-resonances-fail-with-error-toolhead-object-has-no-attribute-cmd-m204/24589/4 "2025-08-15T11:49:09Z")

</div>

That PR was merged, so you just need to update Klipper with the Moonraker update manager.

---

<div class="post-metadata">

**Author:** ![Kellwa](https://avatars.discourse-cdn.com/v4/letter/k/ec9cab/32.png) [@Kellwa](https://klipper.discourse.group/u/Kellwa)\
**Post date:** [August 15, 2025, 12:28pm UTC](https://klipper.discourse.group/t/shaper-calibrate-and-test-resonances-fail-with-error-toolhead-object-has-no-attribute-cmd-m204/24589/5 "2025-08-15T12:28:23Z")

</div>

thank you

update and tested it is working fine now

---

<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:** [September 14, 2025, 10:28pm UTC](https://klipper.discourse.group/t/shaper-calibrate-and-test-resonances-fail-with-error-toolhead-object-has-no-attribute-cmd-m204/24589/6 "2025-09-14T22:28:56Z")

</div>

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