Error evaluating 'gcode_macro _km_check_and_set_print_bounds:gcode': #186
Replies: 4 comments
-
The error is going to be in either your printer or slicer config, so if you'd need to provide that information if you want help troubleshooting. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi I'm having the same issue with no clue how to fix it.
This is my config
and this is how the beginnig of the gcode look like
please let me know if you need anything else. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This was a bug in formatting the error message. It's fixed on dev in f717812. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
HI, firstly thank you for your macros to help the community, l’m a total beginner trying to use your macros on a modified Ender 5.
I have a error when I try to print after the start print command. I get the following error.
thanks for your help in advance !
" Error evaluating 'gcode_macro _km_check_and_set_print_bounds:gcode': TypeError: not all arguments converted during string formatting"
[gcode_macro _km_check_and_set_print_bounds]
description: Validates all print bounds and caches their values.
gcode:
{% set km = printer["gcode_macro _km_globals"] %}
{% set print = printer["gcode_macro print_start_set"].print %}
Check the mesh bounds.
{% if print.MESH_MIN %}
{% set MESH_MIN = print.MESH_MIN.split(",")|map('float')|list %}
{% set MESH_MAX = print.MESH_MAX.split(",")|map('float')|list %}
{%if MESH_MIN[0] < km.print_min[0] or MESH_MIN[1] < km.print_min[1] %}
{action_raise_error("MESH_MIN %s is outside the printable bounds" %
(MESH_MIN|string, km.print_min|string))}
{%elif MESH_MAX[0] > km.print_max[0] or MESH_MAX[1] > km.print_max[1] %}
{action_raise_error("MESH_MAX %s is outside the printable bounds %s" %
(MESH_MAX|string, km.print_max|string))}
{% endif %}
{% endif %}
Find all the model bounds (including any bounds passed in).
{% set points = [] %}
{% if print.MODEL_MIN or print.MODEL_MAX %}
{% set MODEL_MIN = print.MODEL_MIN.split(",")|map('float')|list %}
{% set MODEL_MAX = print.MODEL_MAX.split(",")|map('float')|list %}
{% set points = [MODEL_MIN, MODEL_MAX] %}
{% endif %}
{% if (printer.exclude_object|default({})).objects %}
{% set points = printer.exclude_object.objects|selectattr('polygon')|
map(attribute='polygon')|sum(start=points) %}
{% set points_len = points|length %}
{% if points_len >= 2 %}
{% set x_coords = (points|map(attribute=0)|sort|list)[0::points_len-1] %}
{% set y_coords = (points|map(attribute=1)|sort|list)[0::points_len-1] %}
{% set MODEL_MIN = (x_coords[0],y_coords[0])|map('float')|list %}
{% set MODEL_MAX = (x_coords[1],y_coords[1])|map('float')|list %}
PRINT_START_SET MODEL_MIN="{MODEL_MIN|join(',')
}" MODEL_MAX="{MODEL_MAX|join(',')}"
{% endif %}
{% endif %}
{% if MODEL_MIN %}
# Check the model bounds.
{% if MODEL_MIN[0] < km.print_min[0] or MODEL_MIN[1] < km.print_min[1] %}
{action_raise_error("MODEL_MIN %s is outside the printable bounds" %
(MODEL_MIN|string, km.print_min|string))}
{% elif MODEL_MAX[0] > km.print_max[0] or MODEL_MAX[1] > km.print_max[1] %}
{action_raise_error("MODEL_MAX %s is outside the printable bounds %s" %
(MODEL_MAX|string, km.print_max|string))}
{% endif %}
{% endif %}
Beta Was this translation helpful? Give feedback.
All reactions