Misleading [Errno 5] Input/output error on irrelevant config error!

Basic Information:

Printer Model: DIY skr 1.3 on USB
MCU / Printerboard: skr 1.3 LPC1768
Host / debian server PC
klippy.log

klippy(11).log (10.0 KB)

Describe your issue:

I intentionally duplicated these sections:

[bed_screws]
screw1: 30.5, 37
screw2: 30.5, 207
screw3: 204.5, 207
screw4: 204.5, 37

[bed_screws]
screw1: 30,30
screw2: 210,30
screw3: 30,210
screw4: 210,210

Then it always failed with connection error (even though serial exists and I can write to it)

(reboot and reinstall on master/slave side didn’t help..)

mcu ‘mcu’: Unable to open serial port: [Errno 5] could not open port /dev/serial/by-id/usb-Klipper_lpc1768_1880000F48104AAFD8A9675DC32000F5-if00: [Errno 5] Input/output error: ‘/dev/serial/by-id/usb-Klipper_lpc1768_1880000F48104AAFD8A9675DC32000F5-if00’

This made me waste 4hrs..

Please fix it so communication errors are real ones, and give warning for duplicated sections.

…

To clarify, you are not asking for help but feel there is a bug in error handling/reporting?

The provided example has nothing to do with IO errors.
I can place as many duplicate sections as I want, last one wins.
This is how configfile works.

So, I’ve placed your example in my config and everything works as before.

Regards,
-Timofey

My bad, seems like a red herring.

I created one for the actual connection issue: