Configuration Errors
This page focuses on configuration section conflicts, parameter spelling, include files, and SAVE_CONFIG related issues. After modifying configuration, please first check the first configuration error in klippy.log, then address each issue one by one.
homing override method always homes X and Y before homing Z
Error Message: Safe Z homing conflicts with homing override configuration.
Cause: Both [safe_z_home] and [homing_override] are configured simultaneously, causing Klipper to be unable to determine which homing logic to use.
Solution:
- Search for
[safe_z_home]and[homing_override]in the configuration file. - Keep only one of them based on the actual homing logic of the machine.
- Save and restart Klipper.
Related configuration references: Homing and Direction Calibration Guide, Homing Override Reference Configuration.
Option 'xxx' is not valid in section 'yyy'
Error Message: Option 'xxx' is not valid in section 'yyy', indicating an unrecognized option name in the specified configuration section.
Common Causes:
- Misspelled option names, such as writing
sensor_pinassensor_ping. - Accidentally pasting options from other configuration sections into the current one, such as writing
[probe]options into[stepper_z]. - After a Klipper upgrade, options supported by older versions have been removed or renamed.
- Using commented content that is not an actual parameter, such as
default_parameter_z.
Solution:
- Carefully check the configuration section and option name indicated in the error to confirm the spelling.
- Refer to the Klipper Configuration Reference to confirm which section the option should belong to.
- If Klipper was recently upgraded, check the Configuration Changes Log to see if the option has changed.
- Delete invalid options or move them to the correct configuration section.
Related configuration references: Configuration Modification Guide.
Section 'xxx' is not a valid config section
Error Message: Section 'xxx' is not a valid config section, Unknown config object, or a configuration section cannot be recognized by Klipper.
Common Causes:
- Misspelled configuration section names, such as writing
[bed_mesh]as[bedmesh]. - The current Klipper version does not support this configuration section, or the configuration format is incompatible after an update/downgrade.
- Copied third-party plugin configurations, but the corresponding plugin, extension module, or Klipper branch is not installed.
- Include files retain configuration sections from other machines or other motherboards.
Solution:
- Based on the configuration section name in the error, locate the corresponding section in
printer.cfgand all include files. - Confirm the spelling matches the Klipper configuration reference. Do not use Chinese brackets or full-width symbols in section names.
- If the configuration comes from a third-party plugin or custom macro package, confirm the corresponding plugin is installed and compatible with the current Klipper version.
- If unsure about the purpose of the section, comment it out and restart to test first, then restore items one by one.
Related configuration references: Configuration Modification Guide.
Unable to open config file / Include file does not exist
Error Message: Unable to open config file /home/xxx/printer_data/config/printer.cfg or Include file 'xxx.cfg' does not exist.
Common Causes:
- The
printer.cfgfile path is incorrect or the file was accidentally deleted. - The sub-configuration file referenced by
[include]does not exist or the filename does not match. - Tools like KIAUH automatically generate
[include]references, but the corresponding cfg file was not installed. - Permission issues prevent Klipper from reading the configuration file.
Solution:
- Confirm whether
printer.cfgexists in the Klipper configuration directory, typically~/printer_data/config/printer.cfg. - Check all
[include xxx.cfg]lines to confirm the referenced files actually exist. - If
fluidd.cfgormainsail.cfgis missing, add the configuration by referring to the corresponding Web interface installation documentation. - Ensure the configuration file permissions are correct:
ls -la ~/printer_data/config/.
Fluidd / Mainsail Basic Configuration Missing
Error Message: Fluidd or Mainsail reports missing basic configuration. Common keywords include:
[virtual_sdcard] not found in printer configuration.
[pause_resume] not found in printer configuration.
[display_status] is required if you do not have a [display] defined.
CANCEL_PRINT macro not found in configuration.
Fluidd example:
Mainsail example:
Common Causes:
printer.cfgdoes not enable[include fluidd.cfg]or[include mainsail.cfg].fluidd.cfg/mainsail.cfgis missing from the configuration directory, or the include filename is misspelled.- When manually configuring,
[virtual_sdcard],[pause_resume],[display_status]were omitted. CANCEL_PRINTmacro is not defined, or the macro file is not included.
Solution:
-
It is mandatory to prioritize using the default frontend configuration file. It is not recommended for regular users to bypass the warning by manually adding a few configuration sections. The default
fluidd.cfg/mainsail.cfgprovides the basic configuration needed by the frontend, including virtual SD card, pause/resume, display status, and cancel print macros. -
Confirm whether
printer.cfgcontains the include corresponding to the current frontend at the top:[include fluidd.cfg]Or:
[include mainsail.cfg] -
If using a FLY pre-installed system or official reference configuration, confirm the
fluidd.cfg/mainsail.cfgfiles exist in the~/printer_data/config/directory. -
If the corresponding file does not exist, re-add the frontend default configuration file, or refer to the Fluidd Initial Configuration Guide.
-
After enabling the default frontend configuration file, if you need to modify the positions and retraction parameters for pause, resume, and cancel print, add
_CLIENT_VARIABLEaccording to the Pause and Cancel Print Custom Positions guide. Do not directly copy or rewrite the defaultCANCEL_PRINT/PAUSE/RESUMEmacros. -
Only when maintaining a custom system and clearly understanding the frontend macro dependencies, consider manually supplementing the basic sections. This approach is not recommended for regular users and at minimum needs to include:
[virtual_sdcard]path: ~/printer_data/gcodeson_error_gcode: CANCEL_PRINT[pause_resume][display_status]Additionally, a working
[gcode_macro CANCEL_PRINT]must be provided, otherwise the frontend will still reportCANCEL_PRINT macro not found in configuration. -
After saving the configuration, execute
RESTART. If the warning persists, continue checking whether all include files are actually being read by Klipper.
Frontend Macro Usage Guide: Pause and Cancel Print Custom Positions Macro Configuration Reference: Macro Introduction
Unable to parse option / option must be specified
Error Message: Unable to parse option 'xxx' in section 'yyy', Option 'xxx' in section 'yyy' must be specified, or must have minimum/maximum, must be above/below.
Common causes:
- Required parameters are missing, for example,
[extruder]is missingstep_pin,dir_pin,heater_pin, orsensor_type. - Parameter format errors, such as providing text where a number is required, or missing a comma in a coordinate list.
- Parameter values exceed the range allowed by Klipper, for example, unreasonable settings for
run_current,max_temp, orposition_max. - When copying configuration, Chinese punctuation, full-width symbols, or invisible characters were retained.
Solutions:
- Based on the configuration section and parameter name in the error message, go back to the corresponding
.cfgfile and check each item. - For numbers, coordinates, and list parameters, confirm the format matches the examples, for example,
mesh_min: 20, 20. - For
must be above/beloworminimum/maximumerrors, first restore the values to the official examples or the recommended values from the motherboard tutorial. - After saving, execute
RESTART. If it still fails, check the first configuration error inklippy.log.
Related configuration reference: Configuration Modification Instructions.
Unknown pin chip name / Pin is not a valid pin name / pin used multiple times
Error message: Unknown pin chip name 'xxx', Pin 'PB12' is not a valid pin name on mcu 'mcu', Invalid pin description 'xxx', pin xxx used multiple times in config.
Common causes:
- In a multi-MCU setup, the pin prefix is written incorrectly, for example,
toolboard:PB0was intended, but a non-existent MCU name was used. - The MCU ID (
canbus_uuidorserial) is configured incorrectly, causing the pin to be mapped to the wrong device which does not have the corresponding pin. - Pin names are misspelled, or a pin from one motherboard's tutorial was directly copied to another motherboard.
- The same physical pin is used by multiple features simultaneously, such as a fan, heater, and endstop all using the same pin.
- The pin modifiers
!(inverted),^(pull-up), or~(pull-down) are placed in the wrong position.
Solutions:
- Verify that the name in
[mcu xxx]exactly matches the pin prefix, including case sensitivity. - Verify that the
canbus_uuidorserialin the[mcu xxx]section matches the actual device (can be checked withls /dev/serial/by-id/orpython3 -c "import can; ..."). - Cross-reference the motherboard pinout diagram to ensure that every
pin:,step_pin:,dir_pin:, andheater_pin:belongs to the current motherboard. - Search all include files for the erroring pin, and delete or change duplicate usages.
- Pin modifiers should be written before the pin name, for example,
^PB7,!PC13,mcu2:^PB7.
Related configuration reference: Configuration Modification Instructions, Fan Reference Configuration.
gcode command XXX already registered
Error message: Error: gcode command XXX already registered.
Error cause: Two different macros or system modules register the same G-code command name, for example, two macros both define [gcode_macro NEXT].
Common scenarios:
- User-defined macros conflict with Klipper system modules or third-party configurations.
- Multiple definitions of
[gcode_macro M600].
Solutions:
- Search for duplicate definitions in
printer.cfgand all[include]files. - Delete or rename the conflicting
[gcode_macro]definitions. - Check common macros like
[homing_override],[gcode_macro PAUSE],[gcode_macro RESUME], and[gcode_macro CANCEL_PRINT].
Related configuration reference: Macros Introduction.
Unknown command:"XXX"
Error message: Unknown command:"PRINT_START", Unknown command:"START_PRINT", Unknown command:"M600", Unknown command:"EXCLUDE_OBJECT_DEFINE", Unknown command:"EXCLUDE_OBJECT_START", Unknown command:"EXCLUDE_OBJECT_END", Unknown command:"M106", Unknown command:"M201", Unknown command:"M203", Unknown command:"M205", etc. appear in the console or klippy.log.
Common causes:
- The slicer's start or end G-code calls a macro that does not exist in Klipper. For example, the slicer sends
PRINT_START, but the configuration only defines[gcode_macro START_PRINT]. - Commands migrated from Marlin are used, which Klipper does not support by default or requires macros for compatibility.
- Exclude objects is enabled, but the slicer, Moonraker, or Klipper configuration is incomplete, so commands such as
EXCLUDE_OBJECT_DEFINE,EXCLUDE_OBJECT_START, andEXCLUDE_OBJECT_ENDare not recognized. - The fan uses
[fan_generic]or[output_pin], but the slicer still sends the defaultM106/M107. - A third-party macro package is missing an include file, or the macro names do not match the names entered in the slicer.
Solutions:
- Search
printer.cfgand all include files for the command name in the error to confirm whether the corresponding[gcode_macro XXX]exists. - Make the start, end, filament change, fan, and exclude object command names in the slicer consistent with the Klipper macros.
- If these are Marlin commands, preferentially delete the unneeded commands; only add explicit Klipper macros when compatibility is truly required.
- For exclude object related errors, also check whether the slicer outputs object tags, whether Moonraker has object processing enabled, and whether Klipper has
[exclude_object]. - For fan command errors, confirm whether
[fan]should be used, or add matching control macros for[fan_generic]/[output_pin].
EXCLUDE_OBJECT_DEFINE / START / END
Meaning of the error: EXCLUDE_OBJECT_DEFINE is used to define print objects, and EXCLUDE_OBJECT_START / EXCLUDE_OBJECT_END are used to mark which object the current G-code belongs to, so the frontend can display and exclude specified objects during multi-object printing. If Unknown command:"EXCLUDE_OBJECT_DEFINE", Unknown command:"EXCLUDE_OBJECT_START", or Unknown command:"EXCLUDE_OBJECT_END" repeatedly appears in klippy.log, it means the G-code already contains object exclusion commands, but the current Klipper configuration does not correctly receive such commands.
Check first:
- Confirm that the following exists in
printer.cfgor an included configuration file:
[exclude_object]
- After modifying, run
RESTART, then re-upload the G-code file for testing. Old files that have already been uploaded may not have been processed with the latest configuration, so it is recommended to re-slice or re-upload. - Check whether object processing is enabled in the Moonraker configuration. The common configuration location is
moonraker.conf:
[file_manager]
enable_object_processing: True
- Check whether the slicer has enabled object tagging / exclude object related output. The names differ between slicers; a common sign is that
EXCLUDE_OBJECT_DEFINE,EXCLUDE_OBJECT_START,EXCLUDE_OBJECT_END, or object names can be found in the G-code. - If you only want to temporarily complete the print and do not need the exclude object feature, you can disable exclude object related output in the slicer and re-slice; do not delete only some object commands in the file, otherwise the frontend object list may become abnormal.
How to determine the direction:
- Only
EXCLUDE_OBJECT_START/EXCLUDE_OBJECT_ENDare reported: preferentially add[exclude_object], then restart Klipper. - The frontend has no object list, but Klipper no longer reports Unknown command: preferentially check Moonraker's object processing and whether the G-code has been re-uploaded.
- No object related commands can be found in the file at all: this means the slicer did not output object tags, and it needs to be enabled on the slicer side.
Related configuration reference: Macro introduction, Configuration modification instructions.
Common Marlin command comparison
When the slicer continues to use Marlin start G-code or machine presets, it often sends commands that Klipper does not have built in (such as M900, M420, T0). Such errors will not interrupt printing, but the corresponding functions will not take effect. First compare the command name in the error with the table below, then decide whether to "switch to Klipper native commands" or "disable that output in the slicer":
| Error command | Marlin meaning | Corresponding Klipper approach |
|---|---|---|
M500 / M501 / M502 / M503 | EEPROM save, read, reset, report | Klipper has no EEPROM; after changing the configuration, run SAVE_CONFIG, or edit printer.cfg directly |
M201 / M203 / M205 | Acceleration, feed rate, Jerk | Use SET_VELOCITY_LIMIT for temporary adjustment; for long-term settings, write max_accel, max_velocity, etc. under [printer] |
M900 / M572 | Linear pressure advance | SET_PRESSURE_ADVANCE ADVANCE=..., or configure pressure_advance in [extruder] |
M593 | Input Shaper parameters | SET_INPUT_SHAPER, or configure [input_shaper] directly |
M420 | Enable or load bed mesh | BED_MESH_PROFILE LOAD=default (the bed mesh must be calibrated and saved first) |
G29 | Auto bed leveling | BED_MESH_CALIBRATE; for probe Z offset use PROBE_CALIBRATE |
G34 | Z motor alignment | Z_TILT_ADJUST (requires [z_tilt]) |
M851 | Probe Z offset | Modify z_offset in [probe], or use Z_OFFSET_APPLY_PROBE |
M486 | Cancel object | [exclude_object] + EXCLUDE_OBJECT_DEFINE / START / END; OrcaSlicer can also directly disable Exclude Objects |
M600 | Filament change | Build your own filament change macro (with [pause_resume]), or directly use the frontend's manual filament change |
T0 / T1 | Select tool or extruder | For a single extruder, it can be deleted directly; in OrcaSlicer disable Single Extruder Multi Material; for multiple extruders, a custom switching macro is required |
M0 / M1 | Pause / wait | Klipper has no blocking input command; use PAUSE or a custom macro instead |
M25 / M27 / M31 | SD card pause, status, elapsed time | Handled by the frontend or macros; generally delete directly |
M113 | Host keepalive | Delete directly; Klipper does not need it |
M413 | Power loss recovery switch | Delete directly; FLYOS-FAST uses [power_loss_resume] |
M280 | Servo angle | SET_SERVO SERVO=<name> ANGLE=<angle> |
M301 / M304 | PID parameters | Write pid_Kp, pid_Ki, pid_Kd under [extruder] / [heater_bed], or use PID_CALIBRATE |
M303 | PID auto tuning | PID_CALIBRATE HEATER=extruder TARGET=200 |
M92 | Steps/mm | Convert according to rotation_distance and then modify the corresponding [stepper_*] |
M412 | Filament runout detection switch | Configure [filament_switch_sensor], or delete the command |
M701 / M702 | Load / unload filament | Build your own filament change macro |
M862.1 / M862.3 | Prusa model, nozzle check | PrusaSlicer proprietary commands; delete directly |
M1002 / M991 | Vendor proprietary (common in presets such as Qidi) | Delete directly; Klipper will not recognize them |
M73 / M117 | Print progress / screen message | Klipper has these two commands, but they are only loaded automatically when [display] is enabled; add a [display_status] section |
M300 | Beep | Klipper has no built-in beep command; an output pin plus a macro is required, or delete the command |
Already supported, do not delete by mistake: M104 / M109 / M140 / M190, M106 / M107, M204 (S parameter), M220 / M221, M82 / M83, G90 / G91 / G92, M114 / M118 / M119, M400. These are Klipper built-in commands; if they are also reported as unknown, it is usually because a variant missing required parameters was sent, or a macro has redefined a command with the same name.
Determining the approach:
- If the command appears in the start / end G-code: prioritize deleting it in the slicer, or replacing it with a Klipper macro.
- If the command appears in the layer change G-code (
M600,M486, etc.): first confirm whether the function is actually needed; if not, disable the corresponding slicer option. - If
M73/M117repeatedly report errors: this is the only group that can be "solved by adding configuration"—add[display_status]and then restart Klipper. - Do not stuff commands into empty macros just to eliminate errors: the frontend will mistakenly assume the function is available, but it still will not take effect.
Related configuration references: Macro introduction, Configuration modification instructions.
Error evaluating 'gcode_macro XXX:gcode'
Error message: Error evaluating 'gcode_macro PRINT_START:gcode', jinja2.exceptions.UndefinedError, 'dict object' has no attribute 'BED', 'dict object' has no attribute 'HOTEND', 'dict object' has no attribute 'extrude', 'dict object' has no attribute 'heater_bed', gcode.CommandError.
Common Causes:
- The slicer did not pass the required parameters to the macro. For example, the macro reads
params.HOTEND, but the slicer did not passHOTEND=. - Parameter names are inconsistent. For example, the macro requires
BED/HOTEND, but the slicer actually passesBED_TEMP/EXTRUDER_TEMP. - The macro references a non-existent object. For example,
[heater_bed]is not present in the configuration, but the macro readsprinter.heater_bed. - The macro uses Jinja2 syntax, but parentheses, quotes, filters, or default value syntax are incorrect.
- A command executed within the macro fails first, and the outer layer only displays
Error evaluating.
Solutions:
- Check the full Traceback below
Error evaluatinginklippy.logto confirm which variable or command is causing the error. - Compare the slicer's start G-code to confirm that the passed parameter names exactly match
params.xxxin the macro, including case sensitivity. - Set default values for optional parameters, for example
params.BED|default(60)|float, to avoid errors when parameters are empty. - Search for the
printer.xxxobjects used in the macro and confirm that the corresponding modules exist in the configuration. - If the macro comes from a third-party configuration package, confirm that all dependent include files and base macros have been loaded.
Related configuration reference: Macro Introduction.
SAVE_CONFIG failure or configuration conflict
Error message: After executing SAVE_CONFIG, the system prompts Unable to write config, Option conflict, Cannot save config, or after a restart, Can't read autosave from config file - modifications after header appears.
Common Causes:
- The
printer.cfgfile lacks sufficient permissions for the Klipper process to write to it. This commonly occurs after editing the configuration file withsudo. - Configuration items in the autosave section (the
#*#marker block) conflict with the same options in manually managed[include]files. - The MCU is in a shutdown state, and
SAVE_CONFIGcannot properly apply the new configuration. - There is a syntax error or truncation at the end of the
printer.cfgfile, causing the autosave section write to fail. - Normal configuration, comments, or other non-
#*#lines were manually added after the#*# <---------------------- SAVE_CONFIG ---------------------->marker. Klipper therefore refuses to read the autosave section. - The header of the autosave section or the
#*#lines were corrupted during manual editing, configuration merging, or file synchronization. - Multiple include files redundantly define parameters that should not be automatically saved by
SAVE_CONFIG, such as PID or Z offset.
Solutions:
-
Confirm configuration file permissions:
ls -la ~/printer_data/config/printer.cfgIf the owner is not the current user, execute:
sudo chown $USER:$USER ~/printer_data/config/printer.cfg -
If the printer fails to start after
SAVE_CONFIG, open the bottom ofprinter.cfgand check the#*#autosave section. -
If
modifications after headerappears, back upprinter.cfgfirst, then search for the autosave marker:grep -nE 'SAVE_CONFIG|DO NOT EDIT|^#\*#' ~/printer_data/config/printer.cfg -
Move all configuration that needs manual maintenance to before the
SAVE_CONFIGheader. After the header, only Klipper-generated#*#lines should remain; do not delete the entire autosave section directly, as saved calibration values such as PID, Z offset, and mesh bed may be lost. -
If the autosave section is already corrupted or multiple headers exist, prioritize restoring from the latest and confirmed usable
printer-*.cfgbackup in the same directory, then re-perform necessary calibrations. Do not simply concatenate multiple autosave sections together. -
If the same option also exists in an include file, delete the duplicate item from the autosave section, or manage it uniformly in the include file instead.
-
If the MCU is in a shutdown state, first address the earliest real error and execute
FIRMWARE_RESTART, then re-executeSAVE_CONFIG. -
If permissions are normal but writing still fails, check disk space:
df -h ~/printer_data/.
Related configuration reference: Configuration Modification Notes.
SDCARD_RESET_FILE cannot be run from the sdcard
Error message: SDCARD_RESET_FILE cannot be run from the sdcard.
Common Causes:
- The
SDCARD_RESET_FILEcommand was executed during an SD card print. This command is not allowed to be called during SD card printing. - The slicer's start G-code or a macro mistakenly includes
SDCARD_RESET_FILE.
Solutions:
- Check the slicer's start G-code and custom macros, and delete or comment out the
SDCARD_RESET_FILEcall. - If resetting the SD card file state is truly necessary, execute it manually after the print finishes. Do not place it in the print process.
- If using a
PRINT_STARTmacro, confirm that this command is not called within it.