Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STEAPP-455: added code-key for 'error' and 'warning' messages. #155

Merged
merged 2 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
270 changes: 270 additions & 0 deletions docs/stereotech/quide_error_list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
Код ошибки состоит из 3х частей, ABC:
A: к какой области относится ошибка, диапазон: 0-6
B: статус ошибки error/warning, диапазон: 0-1
C: индификатор ошибки
Пр:
2020: 2-область калибровки; 0-error; 20-Mesh Leveling: Error splitting move

config:
001: Unable to open config file %s" % (filename,)
002: Unable to parse option '%s' in section '%s'
002: Option '%s' in section '%s' must have minimum of %s"
002: Option '%s' in section '%s' must have maximum of %s"
002: Option '%s' in section '%s' must be above %s
002: Option '%s' in section '%s' must be below %s
003: Choice '%s' for option '%s' in section '%s' is not a valid choice"
004: Option '%s' in section '%s' must be specified"
005: Include file '%s' does not exist"
006: Recursive include of config file '%s'" % (filename)
007: Section '%s' is not a valid config section"
008: Option '%s' is not valid in section '%s'"
009: Printer object skew_corection already created"
0010: Unknown config object skew_corection_second."
0011: Unable to load module math_2
0011: Unable to load module skew_corection_2
0012: gcode command %s already registered" % (cmd,)
0013: mux command %s %s %s may have only one key (%s)"
0014: mux command %s %s %s already registered (%s)"
0015: Error loading kinematics '
0016: Error loading template '%s': %s
0017: Error evaluating '%s': %s
0018: A primary [display] section must be defined in printer.cfg to use auxilary displays
0019: Section name [display display] is not valid. Please choose a different postfix.
0020: Existing command '%s' not found in gcode_macro rename

печать/кинематика/движение:
101: Error loading kinematics
102: G-Code move transform already specified
103: Invalid speed in '%s'
104: Unable to parse move '%s'
105: Unknown g-code state: %s
106: Printer not ready
107: Invalid speed in '%s'
108: Unable to parse move '%s'
109: Must home X and Y axes first
1010: homing_override and safe_z_homing cannot be used simultaneously
1011: virtual_sdcard get_file_list
1012: SD write not supported
1013: SDCARD_RESET_FILE cannot be run from the sdcard
1014: SD busy
1015: SD busy
1016: Unable to open file
1017: SD busy
1018: SD busy
1019: Must home axis first

калибровка:
201: axis x=310 out of range (0 - 300)
202: axis y=310 out of range (0 - 300)
203: axis z=310 out of range (0 - 300)
204: tool length not enough for calculate wcs_2_y!
205: Error, tool length not enough!
205: Error, tool length or radius not enough!
206: auto_wcs: improperly formatted entry for point\n%s
207: a_axis_offset: improperly formatted entry for point\n%s
208: auto_wcs: improperly formatted entry for point\n%s
209: b_axis_compensation: improperly formatted entry for point
#bed_mesh
2010: bed_mesh: malformed '%s' value: %s"
2011: Option '%s' in section bed_mesh must have a minimum of %s"
2012: Option '%s' in section bed_mesh must have a maximum of %s
2013: Unable to parse parameter '%s'
2014: Unable to parse parameter '
2015: Parameter '%s
2016: Parameter '%s' must have a maximum of
2017: Unable to parse parameter '%s'
2018: bed_mesh: ERROR, fade_target lies outside of mesh z range\nmin: %.4f, max: %.4f, fade_target: %.4f"
2019: bed_mesh: Mesh extends outside of the fade range, please see the fade_start and fade_end options in example-extras.cfg. fade distance: %.2f mesh min: %.4f mesh max: %.4f"
2020: Mesh Leveling: Error splitting move
2021: bed_mesh: min/max points too close together
2022: bed_mesh: Unable to generate coordinates for faulty region at index: %d
2023: bed_mesh: probe_count must be odd for round beds
2024: bed_mesh: invalid min/max points
2025: bed_mesh: Existing faulty_region_%d %s overlaps added faulty_region_%d %s
2026: bed_mesh: Added faulty_region_%d %s overlaps existing faulty_region_%d %s
2027: bed_mesh: Unknown algorithm <%s>
2028: bed_mesh: cannot exceed a probe_count of 6 when using lagrange interpolation. Configured Probe Count: %d, %d"
2029: bed_mesh: invalid probe_count option when using bicubic interpolation. Combination of 3 points on one axis with more than 6 on another is not permitted. Configured Probe Count: %d, %d"
2030: bed_mesh: bicubic interpolation with a probe_count of less than 4 points detected. Forcing lagrange interpolation. Configured Probe Count: %d, %d
2031: Value for parameter 'PROFILE' must be specified
2032: a_axis_offset: improperly formatted entry for point\n%s
# probe
2033: Probe virtual endstop only useful as endstop pin
2034: Can not pullup/invert probe virtual endstop
2035: Must home before probe
2036: Timeout during endstop homing
2037: Probe samples exceed samples_tolerance
2038: Toolhead moved during probe activate_gcode script
2039: Toolhead moved during probe deactivate_gcode script
2040: Need at least %d probe points for %s
2041: horizontal_move_z can't be less than probe's z_offset
2042: skew_corection: improperly formatted entry for point\n%s
2043: Error! Factor name %s not in list factors['XY', 'XZ', 'YZ']
2044: skew_correction: improperly formatted entry for plane [%s]\n%s

перефирия(mcu):
301: Timeout on wait for '%s' response
302: Error send cmd to mcu
303: Multi-mcu homing not supported on multi-mcu shared axis"
304: проблемы связанные с пинами
305: Pin '%s' is not a valid pin name on mcu '%s'
306: Stepper dir pin must be on same mcu as step pin
307: Internal error in stepcompress
308: Internal error in stepcompress
309: Internal error in stepcompress
3010: Internal error in stepcompress
3011: full_steps_per_rotation invalid in section
3012: PWM cycle time too large
3013: MCU '%s' CRC does not match config"
3014: MCU '%s' error during config: %s
3015: Unable to configure MCU '%s'"
3016: Failed automated reset of MCU '%s'
3017: Too few moves available on MCU '%s'
3018: проблемы с индификацией mcu(serialhdl)
3020: Internal error in MCU stm22 stepcompress"
3021: position_endstop in section '%s' must be between position_min and position_max
3022: Unable to infer homing_positive_dir in section '
3023: Invalid homing_positive_dir / position_endstop in '%s'
3024: Pinter rail %s shared endstop pin %s must specify the same pullup/invert settings
3025: Must specify %s on mcu '%s'"
3026: Unknown %s '%s'"
3027: %s: spi pins must be on same mcu"
3028: Pin %s must be on mcu %s
3029: button pins must be on same mcu
3030: %d steps per detent not supported
3031: Duplicate canbus_uuid
3032: Unknown canbus_uuid
3033: One or more of these steppers are unknown: %s (valid steppers are: %s)
3034: Stepper %s phase unknown
3035: Invalid trigger_phase '%s'
3036: Endstop for %s is not accurate enough for stepper phase adjustment
3037: Endstop %s incorrect phase (got %d vs %d)
3038: Stats not available for stepper %s
3039: Requested temperature (%.1f) out of range (%.1f:%.1f)
3040: Cannot load config '%s'
3041: Heater %s already registered
3042: Unknown heater
3043: G-Code sensor id %s already registered
3044: Unknown temperature sensor '
3045: Error on 'TEMPERATURE_WAIT': missing MINIMUM or MAXIMUM.
3046: Unknown sensor '%s'
3047: error homing_move_end
3048: Endstop %s still triggered after retract
3049: Homing failed due to printer shutdown
3050: Probing failed due to printer shutdown
3051: Probe triggered prior to movement
3052: Homing failed due to printer shutdown
3053: Invalid pin value
3054: error pid_calibrate
3055: pid_calibrate interrupted
3056: Unknown stepper '%s'
3057: Requested min speed (%.1f) is greater than max speed (%.1f)
3058: Requested temperature (%.1f) out of range (%.1f:%.1f)
3059: Requested min speed (%.1f) out of range (0.0 : 1.0)
3060: Requested max speed (%.1f) out of range (0.0 : 1.0)
3061: Unable to open temperature file '%s'
3062: MCU temperature not supported on %s
# tmc UART
3063: TMC mux pins must be on the same mcu
3064: All TMC mux instances must use identical pins
3065: Shared TMC uarts must use the same pins
3066: Shared TMC uarts need unique address or select_pins polarity
3067: TMC uart rx and tx pins must be on the same mcu
3068: Unable to read tmc uart '%s' register %s
3069: Unable to write tmc uart '%s' register %s
# tmc CAN
3070: TMC '%s' reports error: %s
3071: Unknown field name '%s'
3072: VELOCITY parameter not supported by this driver
3073: Specify either VALUE or VELOCITY
3074: Unknown register name '%s'
3075: tmc virtual endstop only useful as endstop
3076: Can not pullup/invert tmc virtual pin
3077: tmc virtual endstop requires diag pin config
3078: Could not find config section '[%s]' required by tmc driver
3079: TMC SPI chain must have same length
3080: TMC SPI chain can not have duplicate position
3081: Unable to write tmc spi '%s' register %s

датчик филамента:
401: Filament error on Extruder0
411: The filament has run out or there is a problem with its supply at the Extruder0.
412: Recover extrusion by offset %s' % printer["gcode_macro RECOVER_EXTRUSION_BY_OFFSET"].checks_made
413: Switch to second extruder and resume printing.
414: All attempt to extrude failed.
415: Recover extrusion after cooling and heating.
416: Recover extrusion do extrude attempt %s' % printer["gcode_macro RECOVER_EXTRUSION_BY_PRIME"].checks_made
417: Extruding attempt completed successfully, resuming printing.

диагностика:
501: 3D module disabled, cannot set temperature for heater 'heater_bed
502: Extruder extruder3 not connected.

экструдер:
601: '%s' is not a valid extruder.
602: Active extruder does not have a stepper
603: Unable to infer active extruder stepper
604: Rotation distance can not be zero
605: Extrude below minimum temp\n See the 'min_extrude_temp' config option for details
606: Extrude only move too long (%.3fmm vs %.3fmm)\n See the 'max_extrude_only_distance' config option for details
607: Move exceeds maximum extrusion (%.3fmm^2 vs %.3fmm^2)\n See the 'max_extrude_cross_section' config option for details
608: Extruder not configured
609: Extrude when no extruder present
6010: Extruder not configured
6011: Extruder not configured
611: Extruder not hot enough.

ethernet/client:
701: Not a top-level dictionary
702: Invalid request type
703: Missing Argument [%s]
704: Invalid Argument Type [%s]
705: Multiple calls to send not allowed
706: webhooks: Unable to delete socket file
707: Path already registered to an endpoint
708: mux endpoint %s %s %s may have only one key (%s)
709: mux endpoint %s %s %s already registered (%s)
7010: The value '%s' is not valid for %s"
7011: webhooks: No registered callback for path '%s'
7012: Remote method '%s' not registered"
7013: No active connections for method '%s
7014: Invalid argument
7015: Invalid argument

остальное:
802: Error in coordinate descent: %s
# msgproto Protocol definitions for firmware communication
806: Unable to extract params from:
806: Unable to encode:
806: Error during identify:
806: Unknown value '%s' in enumeration
#Serial port management for firmware communication(serialhdl.py )
807: failure communication whis mcu
808: Unable to obtain '%s' response

813: Printer not homed
814: Printer not homed
815: Printer not homed.

gcode/gcode cmd:
901: Internal error on command:
902: Malformed command
903: Error on '%s': unable to parse %s"
903: Error on '%s': %s must have minimum of %s
903: Error on '%s': %s must have maximum of %s"
903: Error on '%s': %s must be above %s"
903: Error on '%s': %s must be below %s"
904: %s" % self.printer.get_state_message()[0] - printer is not ready for run this cmd
905: The value '%s' is not valid for %s"
906: Klipper state: Not ready
907: SAVE_CONFIG section '%s' option '%s' conflicts with included value"
908: Unable to parse existing config on SAVE_CONFIG
909: Unable to write config file during SAVE_CONFIG
9010: Unknown stepper %s
9011: %s" % str(e)
9012: Unable to parse existing variable file
9013: Unable to parse '%s' as a literal
9014: Unable to save variable
9015: Internal error on command:"%s", origline"%s"

911: Unknown command:
32 changes: 16 additions & 16 deletions klippy/configfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,28 @@ def _get_wrapper(self, parser, option, default, minval=None, maxval=None,
acc_id = (self.section.lower(), option.lower())
self.access_tracking[acc_id] = default
return default
raise error("Option '%s' in section '%s' must be specified"
raise error("001: Option '%s' in section '%s' must be specified"
% (option, self.section))
try:
v = parser(self.section, option)
except self.error as e:
raise
except:
raise error("Unable to parse option '%s' in section '%s'"
raise error("002: Unable to parse option '%s' in section '%s'"
% (option, self.section))
if note_valid:
self.access_tracking[(self.section.lower(), option.lower())] = v
if minval is not None and v < minval:
raise error("Option '%s' in section '%s' must have minimum of %s"
raise error("002: Option '%s' in section '%s' must have minimum of %s"
% (option, self.section, minval))
if maxval is not None and v > maxval:
raise error("Option '%s' in section '%s' must have maximum of %s"
raise error("002: Option '%s' in section '%s' must have maximum of %s"
% (option, self.section, maxval))
if above is not None and v <= above:
raise error("Option '%s' in section '%s' must be above %s"
raise error("002: Option '%s' in section '%s' must be above %s"
% (option, self.section, above))
if below is not None and v >= below:
raise self.error("Option '%s' in section '%s' must be below %s"
raise self.error("002: Option '%s' in section '%s' must be below %s"
% (option, self.section, below))
return v
def get(self, option, default=sentinel, note_valid=True):
Expand All @@ -74,7 +74,7 @@ def getchoice(self, option, choices, default=sentinel, note_valid=True):
else:
c = self.get(option, default, note_valid=note_valid)
if c not in choices:
raise error("Choice '%s' for option '%s' in section '%s'"
raise error("003: Choice '%s' for option '%s' in section '%s'"
" is not a valid choice" % (c, option, self.section))
return choices[c]
def getlists(self, option, default=sentinel, seps=(',',), count=None,
Expand All @@ -90,7 +90,7 @@ def lparser(value, pos):
return tuple([lparser(p, pos - 1) for p in parts if p])
res = [parser(p) for p in parts]
if count is not None and len(res) != count:
raise error("Option '%s' in section '%s' must have %d elements"
raise error("004: Option '%s' in section '%s' must have %d elements"
% (option, self.section, count))
return tuple(res)
def fcparser(section, option):
Expand Down Expand Up @@ -159,7 +159,7 @@ def _read_config_file(self, filename):
data = f.read()
f.close()
except:
msg = "Unable to open config file %s" % (filename,)
msg = "001: Unable to open config file %s" % (filename,)
logging.exception(msg)
raise error(msg)
return data.replace('\r\n', '\n')
Expand Down Expand Up @@ -226,7 +226,7 @@ def _resolve_include(self, source_filename, include_spec, fileconfig,
include_filenames = glob.glob(include_glob)
if not include_filenames and not glob.has_magic(include_glob):
# Empty set is OK if wildcard but not for direct file reference
raise error("Include file '%s' does not exist" % (include_glob,))
raise error("005: Include file '%s' does not exist" % (include_glob,))
include_filenames.sort()
for include_filename in include_filenames:
include_data = self._read_config_file(include_filename)
Expand All @@ -236,7 +236,7 @@ def _resolve_include(self, source_filename, include_spec, fileconfig,
def _parse_config(self, data, filename, fileconfig, visited):
path = os.path.abspath(filename)
if path in visited:
raise error("Recursive include of config file '%s'" % (filename))
raise error("006: Recursive include of config file '%s'" % (filename))
visited.add(path)
lines = data.split('\n')
# Buffer lines between includes and parse as a unit so that overrides
Expand Down Expand Up @@ -296,12 +296,12 @@ def check_unused_options(self, config):
for section_name in fileconfig.sections():
section = section_name.lower()
if section not in valid_sections and section not in objects:
raise error("Section '%s' is not a valid config section"
raise error("007: Section '%s' is not a valid config section"
% (section,))
for option in fileconfig.options(section_name):
option = option.lower()
if (section, option) not in access_tracking:
raise error("Option '%s' is not valid in section '%s'"
raise error("008: Option '%s' is not valid in section '%s'"
% (option, section))
# Setup get_status()
self._build_status(config)
Expand Down Expand Up @@ -371,7 +371,7 @@ def _disallow_include_conflicts(self, regular_data, cfgname, gcode):
for section in self.autosave.fileconfig.sections():
for option in self.autosave.fileconfig.options(section):
if config.fileconfig.has_option(section, option):
msg = ("SAVE_CONFIG section '%s' option '%s' conflicts "
msg = ("907: SAVE_CONFIG section '%s' option '%s' conflicts "
"with included value" % (section, option))
raise gcode.error(msg)
cmd_SAVE_CONFIG_help = "Overwrite config file and restart"
Expand All @@ -393,7 +393,7 @@ def cmd_SAVE_CONFIG(self, gcmd):
regular_data, old_autosave_data = self._find_autosave_data(data)
config = self._build_config_wrapper(regular_data, cfgname)
except error as e:
msg = "Unable to parse existing config on SAVE_CONFIG"
msg = "908: Unable to parse existing config on SAVE_CONFIG"
logging.exception(msg)
raise gcode.error(msg)
regular_data = self._strip_duplicates(regular_data, self.autosave)
Expand All @@ -416,7 +416,7 @@ def cmd_SAVE_CONFIG(self, gcmd):
os.rename(cfgname, backup_name)
os.rename(temp_name, cfgname)
except:
msg = "Unable to write config file during SAVE_CONFIG"
msg = "909: Unable to write config file during SAVE_CONFIG"
logging.exception(msg)
raise gcode.error(msg)
# Request a restart
Expand Down
Loading