Keep getting random error on bed mesh

Basic Information:

Printer Model: Modified Sunlu S8 with BTT manta e3ez 2209 ez drivers
MCU / Printerboard: Btt Manta e3ez
Host / SBC klipper on a dedicated PC running 3 other printers no issue (only one right now)
klippy (7).log (5.1 MB)

klippy.log

Describe your issue:

It keeps erroring when I attempt a bed mesh, it works sometimes if I manually attempt a mesh and runs the entire process no issues, using BD sensor (inductive)

Basically copied all old files from other printer and modified what was needed for larger print area.

my console started print, homed, heated bed then did the z tilt with no issue then…

12:53 PM

FIRMWARE_RESTART

12:53 PM

Internal error on command:“START_PRINT”

12:53 PM

Internal error on command:“BED_MESH_CALIBRATE”

12:53 PM

Klipper state: Shutdown

12:53 PM

Found 1 objects

I found some deeper errors

error(“Internal error in MCU ‘%s’ stepcompress”

But on github all of those were fixed back in 2021 or so!!!

Thanks!

You have a lot of different errors, one of them:

Traceback (most recent call last):
  File "/home/mike/klipper/klippy/gcode.py", line 459, in _respond_raw
    os.write(self.fd, (msg+"\n").encode())
BlockingIOError: [Errno 11] Resource temporarily unavailable

Looks like your USB2UART got disconnected.
Like many times.
I’m not familiar with your specific board, but if it can be connected directly by USB, it could be better.


Found 1 objects
Internal error on command:"BED_MESH_CALIBRATE"
Traceback (most recent call last):
  File "/home/mike/klipper/klippy/gcode.py", line 212, in _process_commands
    handler(gcmd)
  File "/home/mike/klipper/klippy/gcode.py", line 140, in <lambda>
    func = lambda params: origfunc(self._get_extended_params(params))
  File "/home/mike/klipper/klippy/extras/bed_mesh.py", line 647, in cmd_BED_MESH_CALIBRATE
    self.update_config(gcmd)
  File "/home/mike/klipper/klippy/extras/bed_mesh.py", line 607, in update_config
    need_cfg_update |= self.set_adaptive_mesh(gcmd)
  File "/home/mike/klipper/klippy/extras/bed_mesh.py", line 466, in set_adaptive_mesh
    for point in obj["polygon"]:
KeyError: 'polygon'

Looks like gcode is borked, there should be a string like:

EXCLUDE_OBJECT_DEFINE NAME=Part_Studio_1_-_Part_1.stl_id_0_copy_0 CENTER=102.537,134.277 POLYGON=[[22.2612,64.8517],[129.765,31.6968],[182.813,203.702],[75.309,236.857],[22.2612,64.8517]]

Technically if you are able to produce borked gcode file, it may have sense to share it.
So, this strange crash can be fixed, I think if there are borked object definitions, then Klipper should ignore it, not crash.


Unhandled exception during run
Traceback (most recent call last):
  File "/home/mike/klipper/klippy/klippy.py", line 176, in run
    self.reactor.run()
  File "/home/mike/klipper/klippy/reactor.py", line 292, in run
    g_next.switch()
  File "/home/mike/klipper/klippy/reactor.py", line 340, in _dispatch_loop
    timeout = self._check_timers(eventtime, busy)
  File "/home/mike/klipper/klippy/reactor.py", line 158, in _check_timers
    t.waketime = waketime = t.callback(eventtime)
  File "/home/mike/klipper/klippy/extras/BDsensor.py", line 336, in scan_sample_event
    intd = self.mcu_probe.BD_Sensor_Read(0)
  File "/home/mike/klipper/klippy/extras/BDsensor.py", line 857, in BD_Sensor_Read
    raise self.printer.command_error("Bed Distance Sensor, "
gcode.CommandError: Bed Distance Sensor, out of range.:10.15 
Transition to shutdown state: Unhandled exception during run

Hope in helps.

This could also be the consequence of a broken or incompatible install of the BDsensor.

1 Like

edit AGAIN… I had stupid superslicer set to Marlin Legacy instead of klipper, it didn’t add the
exclude object define!!!

Trying again!!!

edit, I forgot to add

[file_manager]
enable_object_processing: True

to my moonraker.conf, I will report back…

sometimes it is the simple things!!!

here is the top of my gcode, i have superslicer set to custom only which is the two lines of calculate PA and Start print, do i need to add another line to define the object?

; generated by SuperSlicer 2.5.59.12 on 2025-02-09 at 17:25:03 UTC

; 

; external perimeters extrusion width = 0.56mm
; perimeters extrusion width = 0.56mm
; infill extrusion width = 0.56mm
; solid infill extrusion width = 0.56mm
; top infill extrusion width = 0.56mm
; support material extrusion width = 0.47mm
; first layer extrusion width = 0.56mm

; object:{"name":"Voron_Design_Cube_v7","id":"Voron_Design_Cube_v7 id:0 copy 0","object_center":[155.000000,155.000000,0.000000],"boundingbox_center":[155.000000,155.000000,15.000000],"boundingbox_size":[40.000000,40.000000,40.000000]}
; Total objects to print: 1
M486 T1
; plater:{"center":[155.000000,155.000000,0.000000],"boundingbox_center":[155.000000,155.000000,15.000000],"boundingbox_size":[40.000000,40.000000,40.000000]}

M107
;TYPE:Custom
CALCULATE_PA BOWDEN_LENGTH=385 MATERIAL=PLA LAYER_HEIGHT=0.2 NOZZLE_SIZE=0.4 PRINT_SPEED=35
START_PRINT EXTRUDER_TEMP=200 BED_TEMP=60 SLICER=SUPER SKIRT=0 BRIM=0

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