hplip crashes running: sudo hp-setup

Bug #1627710 reported by Ezekiel
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
hplip (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

I have a HP LaserJet Professional m1212 nf MFP setup as a network printer. When I run hp-setup, hplip crashes.

Steps I used:
1. type 'sudo hp-setup' in the terminal, then entering my password.
2. select the second option (network/ethernet/wireless) and click next
3. scan successfully found my printer's ip address
4. click next
5. click add printer
6. seeing a nasty python error in the terminal:

"""
HP Linux Imaging and Printing System (ver. 3.16.3)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Searching... (bus=net, timeout=5, ttl=4, search=(None) desc=0, method=slp)
Traceback (most recent call last):
  File "/usr/share/hplip/ui4/setupdialog.py", line 1304, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui4/setupdialog.py", line 730, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/share/hplip/ui4/setupdialog.py", line 1099, in readwriteFaxInformation
    d = fax.getFaxDevice(self.fax_uri, disable_dbus=True)
  File "/usr/share/hplip/fax/fax.py", line 534, in getFaxDevice
    return MarvellFaxDevice(device_uri, printer_name, callback, fax_type, disable_dbus)
  File "/usr/share/hplip/fax/marvellfax.py", line 91, in __init__
    sendfax_a_path = os.readlink(sendfax_path+"/hp-sendfax")
OSError: [Errno 22] Invalid argument: '/usr/bin/hp-sendfax'
Traceback (most recent call last):
  File "/usr/share/hplip/ui4/setupdialog.py", line 1304, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui4/setupdialog.py", line 730, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/share/hplip/ui4/setupdialog.py", line 1099, in readwriteFaxInformation
    d = fax.getFaxDevice(self.fax_uri, disable_dbus=True)
  File "/usr/share/hplip/fax/fax.py", line 534, in getFaxDevice
    return MarvellFaxDevice(device_uri, printer_name, callback, fax_type, disable_dbus)
  File "/usr/share/hplip/fax/marvellfax.py", line 91, in __init__
    sendfax_a_path = os.readlink(sendfax_path+"/hp-sendfax")
OSError: [Errno 22] Invalid argument: '/usr/bin/hp-sendfax'

"""

WORKAROUND: Use hplip 3.17.11 from upstream's website:
https://developers.hp.com/hp-linux-imaging-and-printing

Revision history for this message
Matjaž (matjazb) wrote :
Download full text (3.3 KiB)

It affects me to, possibly the same bug, using network printer (HP Laserjet 3052).
I confirm it affects me on 16.04 using package manager supplied hplip (v 3.16.3 ),
and even using the latest version of hplip from the project's website (v 3.16.10).

Steps to reproduce : as described in previous post.
The same process after installing hplip v 3.16.10, same result.
Traceback is slightly different with newer version of hplip, but top of the trace is the same file :
###
Found device: hp:/net/HP_LaserJet_3052?ip=__MY__IP__
Traceback (most recent call last):
  File "/usr/share/hplip/ui4/setupdialog.py", line 1305, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui4/setupdialog.py", line 731, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/share/hplip/ui4/setupdialog.py", line 1128, in readwriteFaxInformation
    self.fax_number = to_unicode(d.getPhoneNum())
  File "/usr/share/hplip/fax/pmlfax.py", line 149, in getPhoneNum
    return utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
  File "/usr/share/hplip/base/utils.py", line 956, in printable
    return s.translate(identity, unprintable)
AttributeError: 'NoneType' object has no attribute 'translate'

Done.
###

Workaround :
I applied it on hplip version 3.16.10 (see below), ubuntu 16.04 ships with 3.16.3.
Disclaimer : Worked for me, possibly breaks something when fax number is required.

1. install hplip with auto installer, from hplip project's website (http://hplipopensource.com/hplip-web/gethplip.html)

2. Change file /usr/share/hplip/base/utils/.py :
Change function printable(s) into :
 955 def printable(s):
 956 if s :
 957 return s.translate(identity, unprintable)
 958 else :
 959 return ""
 960
(return empty string when s is None, otherwise changes nothing)

More info :
hplip site in release notes states that hplip v 3.16.3 supports ubuntu 16.04 in beta,
and only v 3.16.5 supports it (excerpt from http://hplipopensource.com/hplip-web/release_notes.html).
"""
HPLIP 3.16.5 - This release has the following changes:
Added Support for the Following New Printers:
...
Added support for the following new Distro's:

- Ubuntu 16.04
- Debian 8.4
"""
Ubuntu 16.04 still ships with hplip 3.16.3. Not that updating to 3.16.10 (latest) would help to resolve this problem.

"""
NOTE TO BUG REPORTERS :
As devs are users themselves, we can understand the frustration you face when things don't work the way you wanted,
fail unpredictably or give you the feeling of being let down by what you feel should just work for you.
The feeling is even worse when you feel powerless to change the outcome, but depend on it in some way.
Hey, we can see how it is pretty bad to feel compelled to dump a piece of software you recommended to your friends ?

In any case, user made bug reports are how things get fixed. Thanks for taking the time.
For me it told me I am not alone with this problem.

Unfortunately there are always more bugs as there is time to fix them.
You can see a list of just hplip bugs here : https://bugs.launchpad.net/hplip
There is plenty.

And to improve Ubuntu for as many people as possible, this sometimes means...

Read more...

penalvch (penalvch)
Changed in sane-backends (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Ezekiel, how much were you paying again for the service you are requesting? Not that anyone you pay should have to deal with your abuses. Go fix your problem yourself or go to ... IMHO. We don't need your kind.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Are you giving HP the same kind of abuse? They're really the ones who ought to make your setup work.

Revision history for this message
Ezekiel (ezey) wrote :

Rolf, I am not using Ubuntu anymore for some time now (which is why I couldn't apply stepps suggested by previous responders).
I've been using ubunto for several years. It had it's peek around 2012, but it goes down ever since. Too many anoying bugs. I hope this changes and ubuntu get's back on track. At the moment I find it too frustrating to use.
I've written my "note to devs" with frustration, but also eith love to my first linux distro. The childish responses I get leave me with bad taste.
Good luck to you all.

Revision history for this message
penalvch (penalvch) wrote :

Ezekiel, unfortunately, I wasn't aware that apport doesn't presently work for sane-backends, and I've filed https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1656599 about it. My bad.

Changed in sane-backends (Ubuntu):
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sane-backends (Ubuntu):
status: New → Confirmed
Revision history for this message
yossarian holmberg (ubuntu-yossman) wrote :

for anyone still running into this problem, i worked around it today by getting the latest HPLIP from https://developers.hp.com/hp-linux-imaging-and-printing (i downloaded 3.17.11) and when installing it i told it to not enable PC/network fax support (it asks near the beginning of the install); also remember to let it uninstall your old version of HPLIP, and allow it to install the dependencies it wants. the setup of the printer continued fine after that, and i now have printing and scanning working properly on this HP M1212nf laser printer i'm testing on a kubuntu 16.04 LTS station. i used xsane to test the scanning capabilities. if you don't need PC/network fax capabilities, this worked for me to get the rest of it working. -- yossman.net/2018-02-18

penalvch (penalvch)
description: updated
description: updated
affects: sane-backends (Ubuntu) → hplip (Ubuntu)
summary: - sudo hp-setup fails
+ hplip crashes running: sudo hp-setup
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.