HPLIP with error on g.py file

Asked by LINNO SANTOS

Hi!
I wish you are all well.

Follow the information as required:

1. Your Linux Distribution and version:
Debian GNU/Linux 12 (bookworm) with LXQt desktop environment.

2. Your printer make/model:
HP Color LaserJet 2600n

3. If possible, run 'hp-check -t' and post the output:

dti@srvxAE2401:~$ hp-check -t
Traceback (most recent call last):
  File "/usr/local/bin/hp-check", line 38, in <module>
    from base.g import *
  File "/usr/local/share/hplip/base/g.py", line 133
    log.error(f"Error: {e}. Retrying with read_file")
                                                   ^
SyntaxError: invalid syntax
dti@srvxAE2401:~$

4. A detailed explanation of your problem:
The problem is exactly the same of the "hp-check -t" result: an error pointing to some g.py file when I try to execute any of the "hp-xyz" programs (hp-setup, hp-check, hp-toolbox, etc.).

I have followed all the instructions, carefully and more than once, to install hplip-3.24.4 (using the .run program or the .tar.gz file).
On the best result, the shortcuts to HP programs are available on the programs menu of Debian LXQt. But no one of them works when I click on it; simply nothing happen or open.

So, using the menu shortcuts, nothing happen when I click on it. And, using the CLI commands, I receive the same error above, with some variation on the number of the line, according to "hp-xyz" program tried.

I have installed the official packages of "cups" and "python" in full. I tried to install the printer just using CUPS, including a try with a PPD file I have founded on GitHub. For the last, I have installed almost all the HPLIP packages available on Synaptics. The result of all my tries is always the same, as I wrote above.

How to fix my environment, in order to make the HP menu shortcuts and the "hp-xyz" programs work and, finally, to make my printer print?

5. Steps to recreate the problem:
First, I did a clean installation of Debian.
After, I used apt-get update, apt-get upgrade and apt-get full-upgrade.
And I followed this instruction:
https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index
The result already on the Step 2 was this:

dti@srvxAE2401:~/Downloads$ sh hplip-3.24.4.run
Creating directory hplip-3.24.4
Verifying archive integrity... 100% All good.
Uncompressing HPLIP 3.24.4 Self Extracting Archive 100%
Traceback (most recent call last):
  File "./install.py", line 38, in <module>
    from base.g import *
  File "/home/dti/Downloads/hplip-3.24.4/base/g.py", line 133
    log.error(f"Error: {e}. Retrying with read_file")
                                                   ^
SyntaxError: invalid syntax
dti@srvxAE2401:~/Downloads$

So... I couldn't forward.

I hope your help.
And I thank you all you so much since now.

Linno

Question information

Language:
English Edit question
Status:
Answered
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
LINNO SANTOS (olinnosantos) said :
#2

Can you help me with this?

Linno

On Fri, Oct 25, 2024, 07:40 Launchpad Janitor <
<email address hidden>> wrote:

> Your question #818972 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/818972
>
> Status: Open => Expired
>
> Launchpad Janitor expired the question:
> This question was expired because it remained in the 'Open' state
> without activity for the last 15 days.
>
> --
> If you're still having this problem, you can reopen your question either
> by replying to this email or by going to the following page and
> entering more information about your problem:
> https://answers.launchpad.net/hplip/+question/818972
>
> You received this question notification because you asked the question.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

If you need HPLIP on Debian, then you better install the modified package from the Debian repositories and not the hplip*.run file (not the newest version, though)

Execute
apt-get install hplip hplip-gui
with admin rights (e.g by using su or sudo)

Can you help with this problem?

Provide an answer of your own, or ask LINNO SANTOS for more information if necessary.

To post a message you must log in.