Basic Information:
Printer Model: Ender 3 v2
MCU / Printerboard: STM32F103
klippy.log
OctoPi: v0.18.0
OctoPrint: v1.8.4
Fill out above information and in all cases attach your klippy.log
file. Pasting your printer.cfg
is not needed
Describe your issue:
I have a new Klipper installation that I setup on an existing OctoPi instance and I’ve been following the guide on the Klipper website. I ran apt update
and sudo apt upgrade
prior to installation of Klipper. After getting to the “Configuring OctoPrint to use Klipper” section, I configured the settings as described and attempted to connect from OctoPrint. The connection timed out trying to connect to the /tmp/printer
serial port.
After looking in /tmp/klippy.log
, I saw the following:
Unable to open config file /home/pi/printer.cfg
Traceback (most recent call last):
File "/home/pi/klipper/klippy/configfile.py", line 154, in _read_config_file
f = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/home/pi/printer.cfg'
Config error
Traceback (most recent call last):
File "/home/pi/klipper/klippy/klippy.py", line 175, in _connect
self._read_config()
File "/home/pi/klipper/klippy/klippy.py", line 134, in _read_config
config = pconfig.read_main_config()
File "/home/pi/klipper/klippy/configfile.py", line 275, in read_main_config
data = self._read_config_file(filename)
File "/home/pi/klipper/klippy/configfile.py", line 160, in _read_config_file
raise error(msg)
Error: Unable to open config file /home/pi/printer.cfg
Read g-code
Traceback (most recent call last):
File "/home/pi/klipper/klippy/gcode.py", line 400, in _process_data
data = str(os.read(self.fd, 4096).decode())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
... [repeated for each handshake attempt]
Read g-code
Traceback (most recent call last):
File "/home/pi/klipper/klippy/gcode.py", line 400, in _process_data
data = str(os.read(self.fd, 4096).decode())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
The installation instruction don’t tell you to setup the config file until after the initial connection, but I went ahead and copied the printer-creality-ender3-v2-2020.cfg
file from ~/klipper/config/
to ~/printer.cfg
. After restarting the Klipper service, I was now only receiving the following error:
Read g-code
Traceback (most recent call last):
File "/home/pi/klipper/klippy/gcode.py", line 400, in _process_data
data = str(os.read(self.fd, 4096).decode())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
I found an existing discussion here about a similar error, but none of the solutions there have made any difference.
Here is the terminal output from OctoPrint:
Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 7 port/baudrate candidates: /tmp/printer@115200, /tmp/printer@250000, /tmp/printer@230400, /tmp/printer@57600, /tmp/printer@38400, /tmp/printer@19200, /tmp/printer@9600
Trying port /tmp/printer, baudrate 115200
Handshake attempt #1 with timeout 2.0s
Connected to: PackingSerial<id=0xb23b4170, open=True>(port='/tmp/printer', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=2.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
Send: N0 M110 N0*125
Handshake attempt #2 with timeout 2.0s
Send: N0 M110 N0*125
...
Connection closed, closing down monitor
Closing down send loop
klippy.log (2.7 KB)