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 
having to de-prioritize some problems for the benefit of all.
Adding offensive words to the bug report does not increase its priority.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to sane-backends in Ubuntu.
https://bugs.launchpad.net/bugs/1627710

Title:
  sudo hp-setup fails

Status in sane-backends package in Ubuntu:
  New

Bug description:
  I have a network printer - HP LaserJet Professional m1212 nf MFP set
  as a network printer and working with several other pc (windows).

  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'

  """

  NOTE TO DEVS:
  Thanks for deving so much but I can't depend on my Ubuntu machine because I 
can't setup the printer. FOR 6 FUCKING MONTHS. I know you try really hard. But 
this is a plain failure. It saddens me deeply because I really love Ubuntu. 
Just convinced a Debian guy to give Unity a try the other day. But I depend on 
windows for a fucking printer. It sucks, it really does. I wish you'd stop 
releasing new OSes twice a year and focus on making the ones you do release 
work. FUCK YOU CANONICAL FOR NOT MANAGING TO FINISH THE JOB YOU HAVE BEEN 
STARTING SO WELL FOR ALL THESE YEARS.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1627710/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to