Change on_error_gcode from PAUSE to CANCEL_PRINT#64
Open
flaviut wants to merge 1 commit intofrap129:mainfrom
Open
Change on_error_gcode from PAUSE to CANCEL_PRINT#64flaviut wants to merge 1 commit intofrap129:mainfrom
flaviut wants to merge 1 commit intofrap129:mainfrom
Conversation
I ran into an issue where I started a print, but immediately hit a fatal error ("Must home axis first"). This triggered the `on_error_gcode: PAUSE`. `PAUSE` ran and called `PAUSE_BASE`, which successfully set `is_paused = True`, but then `_TOOLHEAD_PARK_PAUSE_CANCEL` also failed trying to move unhomed axes. The macro chain aborted.
The problem here is that the pause was never cancelled. When I ran my next print and tried to pause it, the `PAUSE` command just had no effect at all.
Related log:
```
Starting SD card print (position 0)
Must home axis first: 0.000 0.000 148.194 [32090.261]
Filament width sensor is already Off
Must home axis first: 0.000 0.000 152.894 [32090.261]
Must home axis first: 0.000 0.000 152.894 [32090.261]
virtual_sdcard on_error
Traceback (most recent call last):
File "/home/mks/klipper/klippy/extras/virtual_sdcard.py", line 273, in work_handler
self.gcode.run_script(line)
File "/home/mks/klipper/klippy/gcode.py", line 230, in run_script
self._process_commands(script.split('\n'), need_ack=False)
File "/home/mks/klipper/klippy/gcode.py", line 212, in _process_commands
handler(gcmd)
File "/home/mks/klipper/klippy/gcode.py", line 140, in <lambda>
func = lambda params: origfunc(self._get_extended_params(params))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mks/klipper/klippy/extras/gcode_move.py", line 222, in cmd_SET_GCODE_OFFSET
self.move_with_transform(self.last_position, speed)
File "/home/mks/klipper/klippy/extras/bed_mesh.py", line 224, in move
self.toolhead.move(split_move, speed)
File "/home/mks/klipper/klippy/toolhead.py", line 383, in move
self.kin.check_move(move)
File "/home/mks/klipper/klippy/kinematics/corexy.py", line 77, in check_move
self._check_endstops(move)
File "/home/mks/klipper/klippy/kinematics/corexy.py", line 70, in _check_endstops
raise move.move_error("Must home axis first")
gcode.CommandError: Must home axis first: 0.000 0.000 148.194 [32090.261]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mks/klipper/klippy/extras/virtual_sdcard.py", line 277, in work_handler
self.gcode.run_script(self.on_error_gcode.render())
File "/home/mks/klipper/klippy/gcode.py", line 230, in run_script
self._process_commands(script.split('\n'), need_ack=False)
File "/home/mks/klipper/klippy/gcode.py", line 212, in _process_commands
handler(gcmd)
File "/home/mks/klipper/klippy/gcode.py", line 140, in <lambda>
func = lambda params: origfunc(self._get_extended_params(params))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mks/klipper/klippy/extras/gcode_macro.py", line 195, in cmd
self.template.run_gcode_from_command(kwparams)
File "/home/mks/klipper/klippy/extras/gcode_macro.py", line 74, in run_gcode_from_command
self.gcode.run_script_from_command(self.render(context))
File "/home/mks/klipper/klippy/gcode.py", line 227, in run_script_from_command
self._process_commands(script.split('\n'), need_ack=False)
File "/home/mks/klipper/klippy/gcode.py", line 212, in _process_commands
handler(gcmd)
File "/home/mks/klipper/klippy/extras/gcode_move.py", line 157, in cmd_G1
self.move_with_transform(self.last_position, self.speed)
File "/home/mks/klipper/klippy/extras/bed_mesh.py", line 224, in move
self.toolhead.move(split_move, speed)
File "/home/mks/klipper/klippy/toolhead.py", line 383, in move
self.kin.check_move(move)
File "/home/mks/klipper/klippy/kinematics/corexy.py", line 77, in check_move
self._check_endstops(move)
File "/home/mks/klipper/klippy/kinematics/corexy.py", line 70, in _check_endstops
raise move.move_error("Must home axis first")
gcode.CommandError: Must home axis first: 0.000 0.000 152.894 [32090.261]
Exiting SD card print (position 15631)
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I ran into an issue where I started a print, but immediately hit a fatal error ("Must home axis first"). This triggered the
on_error_gcode: PAUSE.PAUSEran and calledPAUSE_BASE, which successfully setis_paused = True, but then_TOOLHEAD_PARK_PAUSE_CANCELalso failed trying to move unhomed axes. The macro chain aborted.The problem here is that the pause was never cancelled. When I ran my next print and tried to pause it, the
PAUSEcommand just had no effect at all.Related log: