TypeError: translate() takes exactly one argument (2 given)

Bug #1859371 reported by harald.neschke
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

I try to add a new printer HP ColorLaserJet MFP M281.

hp-setup terminates with the following error:

Found device: hp:/net/HP_ColorLaserJet_MFP_M278-M281?ip=x.x.x.x
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1305, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 729, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/share/hplip/ui5/setupdialog.py", line 1128, in readwriteFaxInformation
    self.fax_number = to_unicode(d.getPhoneNum())
  File "/usr/share/hplip/fax/pmlfax.py", line 146, in getPhoneNum
    data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
  File "/usr/share/hplip/base/utils.py", line 958, in printable
    return s.translate(identity, unprintable)
TypeError: translate() takes exactly one argument (2 given)
Abgebrochen (Speicherabzug geschrieben)

HPLIP 3.19.12
Python 3.8.1
ArchLinux

Revision history for this message
Martins Pukitis (lieta) wrote :

Same with:
HPLIP 3.19.6
Python 3.7.5
Ubuntu 19.10

Revision history for this message
Aksel H (akselhovdar) wrote :

Same issue here on Manjaro, MFP M281fdw
HPLIP 3.19.12
Python 3.8.1

Revision history for this message
Aksel H (akselhovdar) wrote :

As a workaround I used the CLI interface to set up the printer. No issues as far as I can tell!
hp-setup -i

Revision history for this message
harald.neschke (haraldneschke) wrote :

This fix solves the problem at least with python 3.

Revision history for this message
David (roboticforest) wrote :

The error shows up both on the Ubuntu 20.04 live CD and a fresh install, both using a fresh download of HPLIP 3.20.5.run installer and following the instructions on HP's website.

There are also some missing dependencies which can be solved by installing pip3 from the "Universe", then using pip3 to install pyqt5, but this "translate() takes exactly one argument (2 given)" error persists no matter what I do.

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.