AttributeError: 'RawConfigParser' object has no attribute 'readfp' Python 3.12.0

Basic Information:

Printer Model: Ender 3
MCU / Printerboard: Creality 4.2.2 board and arduino nano as secondary for input shaper
klippy.log

I was using Klipper - Moonraker -Mainsail ( manually installed on a runit distro), both Klipper and Moonraker were installed using python 3 ( i am not sure which exact version), yesterday i updated my distro using its package manager and turned off the printer and the host. Today i tried accessing mainsail and the GUI was telling me that it couldn´t connect to Moonraker , i manually reinstalled Moonraker by removing the moonraker and moonraker-env directories then used the requirements.txt , soon after Mainsail could connect but Klipper showed an error : AttributeError: ‘RawConfigParser’ object has no attribute ‘readfp’. Did you mean: ‘read’? , I solved the error by re installing Klipper using python2.7 virtualenv , i believe that the package manager of my distro downloaded a new or different python 3 version that is not compatible with Klipper (my current Python version 3.12.0).

I tried installing manually each of the requirements listed in the requirements .txt file , the only one that fails is greenlet==2.0.2, if i install greenlet without specifying version klipper won´t work either.


klippy.log (1.2 KB)

Thanks. This looks like a recent non-backwards compatible change in Python3.12 . I have opened Improve support for python3.12 in configfile.py by KevinOConnor · Pull Request #6388 · Klipper3d/klipper · GitHub as a proposed fix.

-Kevin

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