[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#948932: marked as done (/usr/share/hplip/base/utils.py: /usr/share/hplip/base/utils.py has python error)



Your message dated Fri, 17 Jan 2020 14:39:06 +0000
with message-id <E1isSmA-000FTe-4d@fasolo.debian.org>
and subject line Bug#948932: fixed in hplip 3.19.12+dfsg0-3
has caused the Debian Bug report #948932,
regarding /usr/share/hplip/base/utils.py: /usr/share/hplip/base/utils.py has python error
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
948932: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=948932
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: hplip-data
Version: 3.19.12+dfsg0-2
Severity: important
File: /usr/share/hplip/base/utils.py
Tags: patch

When trying to add a new printer, I receive the error below, and
the printer is not added. Applying the patch allow the printer to be
added.

user@debian-10-testing:~$ hp-setup -ldebug

HP Linux Imaging and Printing System (ver. 3.19.11)
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.

hp-setup[940]: debug: param=
hp-setup[940]: debug: selected_device_name=None
hp-setup[940]: debug: Using PyQt5
hp-setup[940]: debug: Sys.argv=['/usr/bin/hp-setup', '-ldebug'] printer_name=None param= jd_port=1 device_uri=None remove=False
hp-setup[940]: debug: Starting GUI Event Loop...
hp-setup[940]: debug: Cache miss: officejet_pro_8500_a909g
hp-setup[940]: debug: Reading file: /usr/share/hplip/data/models/models.dat
hp-setup[940]: debug: Searching for section [officejet_pro_8500_a909g] in file /usr/share/hplip/data/models/models.dat
hp-setup[940]: debug: Found section [officejet_pro_8500_a909g] in file /usr/share/hplip/data/models/models.dat
Found device: hp:/net/Officejet_Pro_8500_A909g?hostname=hp8500
hp-setup[940]: debug: Unable to open file /var/lib/hp/hplip.state for reading.
hp-setup[940]: debug: {}
hp-setup[940]: debug: Officejet_Pro_8500_A909g
hp-setup[940]: debug: (CUPS 1.2.x) Getting list of PPDs using CUPS_GET_PPDS...
hp-setup[940]: debug: CUPS PPD base path = /usr/share/cups/model
hp-setup[940]: debug: Foomatic PPD base path = /usr/share/ppd/hplip
hp-setup[940]: debug: Matching PPD list to model  officejet_pro_8500_a909g...
hp-setup[940]: debug: Found match: hplip:0/ppd/hplip/HP/hp-officejet_pro_8500_a909g.ppd
hp-setup[940]: debug: Found match: hplip-data:0/ppd/hplip/HP/hp-officejet_pro_8500_a909g.ppd
hp-setup[940]: debug: Found match: drv:///hpcups.drv/hp-officejet_pro_8500_a909g.ppd
hp-setup[940]: debug: [('hplip:0/ppd/hplip/HP/hp-officejet_pro_8500_a909g.ppd', []), ('hplip-data:0/ppd/hplip/HP/hp-officejet_pro_8500_a909g.ppd', []), ('drv:///hpcups.drv/hp-officejet_pro_8500_a909g.ppd', [])]
hp-setup[940]: debug: 3 matches found. Searching based on PDL: Host > PS,PDF > PCL/Other
hp-setup[940]: debug: 3 matches found. Searching based on Filters: HPCUPS > HPIJS
hp-setup[940]: debug: Selecting PPD: drv:///hpcups.drv/hp-officejet_pro_8500_a909g.ppd
hp-setup[940]: debug: {}
hp-setup[940]: debug: Searching for fax PPD for model officejet_pro_8500_a909g  hpcups_build =1
hp-setup[940]: debug: ppds=['/usr/share/ppd/hplip/HP/HP-Fax4-hpcups.ppd.gz', '/usr/share/ppd/hplip/HP/HP-Fax2-hpcups.ppd.gz', '/usr/share/ppd/hplip/HP/HP-Fax-hpcups.ppd.gz', '/usr/share/ppd/hplip/HP/HP-Fax3-hpcups.ppd.gz']
hp-setup[940]: debug: Found fax PPD: /usr/share/ppd/hplip/HP/HP-Fax-hpcups.ppd.gz
hp-setup[940]: debug: fax-type=1
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1304, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 728, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/share/hplip/ui5/setupdialog.py", line 1127, 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 960, in printable
    return s.translate(identity, unprintable)
TypeError: translate() takes exactly one argument (2 given)
Aborted


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.84-1.pvops.qubes.x86_64 (SMP w/2 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages hplip-data depends on:
ii  python3   3.7.5-3
ii  xz-utils  5.2.4-1+b1

hplip-data recommends no packages.

Versions of packages hplip-data suggests:
ii  hplip  3.19.12+dfsg0-2

-- no debconf information
--- /usr/share/hplip/base/utils.py~	2018-12-10 11:12:18.000000000 -0800
+++ /usr/share/hplip/base/utils.py	2020-01-13 16:51:32.014000000 -0800
@@ -956,7 +956,7 @@
 
 def printable(s):
     if s:
-        return s.translate(identity, unprintable)
+        return s.translate(identity + unprintable)
     else:
         return ""
 
--- /usr/share/hplip/base/utils.py~	2018-12-10 11:12:18.000000000 -0800
+++ /usr/share/hplip/base/utils.py	2020-01-13 16:51:32.014000000 -0800
@@ -956,7 +956,7 @@
 
 def printable(s):
     if s:
-        return s.translate(identity, unprintable)
+        return s.translate(identity + unprintable)
     else:
         return ""
 

--- End Message ---
--- Begin Message ---
Source: hplip
Source-Version: 3.19.12+dfsg0-3

We believe that the bug you reported is fixed in the latest version of
hplip, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 948932@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Didier Raboud <odyx@debian.org> (supplier of updated hplip package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 17 Jan 2020 15:12:43 +0100
Source: hplip
Architecture: source
Version: 3.19.12+dfsg0-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Printing Team <debian-printing@lists.debian.org>
Changed-By: Didier Raboud <odyx@debian.org>
Closes: 948932
Changes:
 hplip (3.19.12+dfsg0-3) unstable; urgency=medium
 .
   * Convert str.translate to a py3-compatible version (Closes: #948932)
Checksums-Sha1:
 45d89e175079901a108fa66e3f9c7765f97aee8e 3198 hplip_3.19.12+dfsg0-3.dsc
 52255f3029cd6a80ed555a5f5194f1dbc1c87a37 112672 hplip_3.19.12+dfsg0-3.debian.tar.xz
Checksums-Sha256:
 419b154b2efef0106947e3cc91229ed4329c8a24862549ff4db25050904cdf05 3198 hplip_3.19.12+dfsg0-3.dsc
 48ff11e1ce2d39ca91243f41f29bbf5e0ed0d65d12a12a32d93e6bbbbc514bea 112672 hplip_3.19.12+dfsg0-3.debian.tar.xz
Files:
 0c879c0560be8f4d879381d2cf13aba2 3198 utils optional hplip_3.19.12+dfsg0-3.dsc
 ff2529bf175b51d067e637736a091eb0 112672 utils optional hplip_3.19.12+dfsg0-3.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEJ3k7rA0YCplkx4gZqcb6xg1jAWkFAl4hxJkACgkQqcb6xg1j
AWk8wg//Shx6nC6/1V6yRgLUUeCeGZjjdQ/57LeSs33rl2vh8GO8AqaLtOgv9w5/
VCO4Ql4O3OaGHEwFgnTBvelbO8ENzcFq0L8ohsVfSFxUlCC3kwWaEaS42cSAlyNT
DxcYhBYPXuOycdA/dMdZauR4iKE5N5Q76Ai7e8QRfgPEM0xkiT7s9Rb2bzTNYpc2
c4Qsid2xAPNk0hWFYgo9sy+R3ud/U73a5tyfMvwK9pN6ICY0pSCg5bnuSHuxDaXY
vzUDpUZZtwud9ZnLIYph0zWFpd25ty/OA6+XDdfec36v/uV07joEg/EXwH3AIaqP
ua1ZKU2luClK3aIcMI+4vfeZh7ixY1rwPDDBRhN2Adkf7bUYVdLhVVvhzJphPfCe
pVCXoxhMfJNbgLpsxPW1Ag1DbuXT6XbwD526RXqiGglaRjffprIqCzI7C85B1kR/
yTPjX1UwJ/ODC8+S1IDMOFzZh/xcc6/asDHJ2MJ/QfgVhkBoi2QSYAq19B0Iu9Tb
WrRHf2UFqa3pjaCMDqlfHEJuD07BctRn4j7UvH21KY7jH4SA8Gje7pReKWW08X++
FT9oicwUMMIMJR1bsuwviteycEZCuXfTJIfaC3ySFcL5/RmhD/RELcYLuEjJ1Fwn
BTudvHlbcH8G1Gp1SQ/xhhEZgZc7QqMr8TVffT5FHSz6oxAoqRo=
=j5zH
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: