Force Move / SET_KINEMATIC_POSITION causes `OrderedDict mutated during iteration` with TMC drivers

Basic Information:

Printer Model: Voron v0.2
MCU / Printerboard: BTT SKR Pico
klippy.log (258.8 KB)
Klipper Version: 0.11.0-277

Describe your issue:

Using either FORCE_MOVE or SET_KINEMATIC_POSITION from a non-homed state causes an exception in the tmc driver.

Relevant section from the log:

SET_KINEMATIC_POSITION pos=0.000,0.000,0.000
['x']
Unhandled exception during run
Traceback (most recent call last):
  File "/home/biqu/klipper/klippy/klippy.py", line 217, in run
    self.reactor.run()
  File "/home/biqu/klipper/klippy/reactor.py", line 292, in run
    g_next.switch()
  File "/home/biqu/klipper/klippy/reactor.py", line 340, in _dispatch_loop
    timeout = self._check_timers(eventtime, busy)
  File "/home/biqu/klipper/klippy/reactor.py", line 158, in _check_timers
    t.waketime = waketime = t.callback(eventtime)
  File "/home/biqu/klipper/klippy/reactor.py", line 48, in invoke
    res = self.callback(eventtime)
  File "/home/biqu/klipper/klippy/extras/tmc.py", line 388, in <lambda>
    cb = (lambda ev: self._do_enable(print_time))
  File "/home/biqu/klipper/klippy/extras/tmc.py", line 354, in _do_enable
    self._init_registers()
  File "/home/biqu/klipper/klippy/extras/tmc.py", line 265, in _init_registers
    for reg_name, val in self.fields.registers.items():
RuntimeError: OrderedDict mutated during iteration

It seems your Klipper is modified with various unofficial modules. Try reproducing this issue with a clean Klipper from the official sources.

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