Comment 2 for bug 2065220

Revision history for this message
Robert Hubbard (hubbardmeister) wrote : Re: [Bug 2065220] Re: Ubuntu installation fails - readfp is deprecated. Use read readfp is deprecated. Use read_file instead: config.read_file

Hi,
Seems there are multiple issues with the install. I ended up using the
stock ubuntu hplip install to get around this.
sudo apt install hplip.
hplip version (3.21.12+dfsg0-1).

On Fri, May 10, 2024 at 6:00 AM Dominic Lonsdale <email address hidden>
wrote:

> I have exactly the same problem.
>
> I understand it is due to a change in Python 3.
> Ubuntu 24.04, Python 3.12.3 HPLIP 3.23.12
>
> AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you
> mean: 'read'?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/2065220
>
> Title:
> Ubuntu installation fails - readfp is deprecated. Use read readfp is
> deprecated. Use read_file instead: config.read_file
>
> Status in HPLIP:
> New
>
> Bug description:
>
> Trying to install 3.23.12.run on Ubuntu
> Distributor ID: Ubuntu
> Description: Ubuntu 22.04.4 LTS
> Release: 22.04
> Codename: jammy
> ~
>
> Python version - Python 3.12.3
>
>
> Python 3.12 has deprecated 'readfp'
>
> installation fails.
>
> AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did
> you mean: 'read'?
>
> File "/home/rhubbard/Downloads/hplip-3.23.12/base/g.py", line 131,
> in read
>
>
> ### from some python updates .. readfp is deprecated. Use read_file
> instead: config.read_file(open(r'abc.txt')) –
>
> Changed base/g.py line 131 : to read_file and install proceeds.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/hplip/+bug/2065220/+subscriptions
>
>

--
Phone 408-206-2208
Regards
Rob Hubbard