Bug 244017

Summary: print/hplip: hp-setup fails
Product: Ports & Packages Reporter: Gerard Seibert <gerard_seibert>
Component: Individual Port(s)Assignee: Tijl Coosemans <tijl>
Status: New ---    
Severity: Affects Only Me CC: tijl
Priority: --- Flags: bugzilla: maintainer-feedback? (tijl)
Version: Latest   
Hardware: Any   
OS: Any   

Description Gerard Seibert 2020-02-10 11:04:24 UTC
FreeBSD 11.3-RELEASE-p6 FreeBSD 11.3-RELEASE-p6 amd64

When attempting to run "hp-setup", the following error message is displayed when I run the utility as 'root' as HP recommends https://developers.hp.com/hp-linux-imaging-and-printing/install/manual/distros/freebsd:

~ # hp-setup

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

Copyright (c) 2001-18 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.

QStandardPaths: wrong ownership on runtime directory /var/run/user/1001, 1001 instead of 0
QStandardPaths: wrong ownership on runtime directory /var/run/user/1001, 1001 instead of 0
Searching... (bus=net, timeout=5, ttl=4, search=(None) desc=0, method=slp)
Created directory: /var/net-snmp
Created directory: /var/net-snmp/mib_indexes
Traceback (most recent call last):
  File "/usr/local/share/hplip/ui5/setupdialog.py", line 1305, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/local/share/hplip/ui5/setupdialog.py", line 729, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/local/share/hplip/ui5/setupdialog.py", line 1128, in readwriteFaxInformation
    self.fax_number = to_unicode(d.getPhoneNum())
  File "/usr/local/share/hplip/fax/pmlfax.py", line 146, in getPhoneNum
    data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
  File "/usr/local/share/hplip/base/utils.py", line 958, in printable
    return s.translate(identity, unprintable)
TypeError: translate() takes exactly one argument (2 given)
Abort trap (core dumped)

If I run it as an unprivileged user:

~ $ hp-setup

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

Copyright (c) 2001-18 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/local/share/hplip/ui5/setupdialog.py", line 1305, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/local/share/hplip/ui5/setupdialog.py", line 729, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/local/share/hplip/ui5/setupdialog.py", line 1128, in readwriteFaxInformation
    self.fax_number = to_unicode(d.getPhoneNum())
  File "/usr/local/share/hplip/fax/pmlfax.py", line 146, in getPhoneNum
    data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
  File "/usr/local/share/hplip/base/utils.py", line 958, in printable
    return s.translate(identity, unprintable)
TypeError: translate() takes exactly one argument (2 given)
Abort trap (core dumped)
Comment 1 Ben Woods freebsd_committer freebsd_triage 2020-09-03 09:19:10 UTC
Update assignee inline with new port maintainer