[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, 31 Jan 2020 13:35:03 +0000
with message-id <E1ixWRr-000AnX-8X@fasolo.debian.org>
and subject line Bug#948932: fixed in hplip 3.19.12+dfsg0-4
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-4

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, 31 Jan 2020 13:54:10 +0100
Source: hplip
Architecture: source
Version: 3.19.12+dfsg0-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Printing Team <debian-printing@lists.debian.org>
Changed-By: Didier Raboud <odyx@debian.org>
Closes: 945109 948932 949578
Changes:
 hplip (3.19.12+dfsg0-4) unstable; urgency=medium
 .
   * Import 34 patches from Fedora, which huge thanks to them!
     - Replace Debian-specific "Convert str.translate to a py3-compatible
       version" with Fedora's "hp-setup fails on fax setup - use binary
       strings" (Closes: #948932)
     [ Tim Waugh ]
     - Replace rubbish pstotiff filter
     - Fix strstr const
     - Retry when connecting to device fails
     - Mark SNMP quirks for two lying devices
     - Fix bogus low ink warning from hpijs driver
     - Clear old state reasons
     - Avoid busy loop in hpcups when backend has exited
     - CUPS filters should use TMPDIR when available
     - Fixed Device ID parsing code in hpijs's dj9xxvip.c
     - Fixed left/right margins for HP DeskJet 990C
     - Fixed uses of strncpy throughout
     - Ignore IOError when logging output
     - Fixed hpcups crash when required plugin missing
     [ Jiří Popelka ]
     - Added several IEEE 1284 Device IDs
     - IEEE1284 Device ID for HP LaserJet 4000
     - Fix ImageableArea for Laserjet 8150/9000
     - Fix parsing of avahi-daemon output
     [ Zdenek Dohnal ]
     - Exit if source cannot be fetched from device
     - hp-check shows 'CUPS incompatible or not running' even if CUPS is
       running
     - hp-firmware:NameError: name 'INTERACTIVE_MODE4' is not defined
     - hp-setup fails on fax setup - use binary strings
     - Fixed hp-setup crash when user wants to define path to PPD file
     - Ignore symlinks when installing plugins
     - Scanning broken for HP LaserJet 3052
     - Cannot scan with M281fdw LaserJet - failed: Error during device I/O
       (Closes: #945109)
     - Fixing issues found by coverity scan
     - [abrt] hplip: strlen(): hp killed by SIGSEGV
     - [abrt] hp-systray:BlockingIOError: [Errno 11] Resource temporarily
       unavailable
     - Missing drivers (Closes: #949578)
     [ Tomas Korbar ]
     - Fix TypeError
     - Fix TypeError in hpfax
     - Fix AttributeError when connecting to printer via wifi
Checksums-Sha1:
 b84c9c01e780354b48379333caf80aec9b977dd2 3198 hplip_3.19.12+dfsg0-4.dsc
 c0c8136fc2e6138f90d9a2e896ea8e756ca68489 133052 hplip_3.19.12+dfsg0-4.debian.tar.xz
Checksums-Sha256:
 02267eefe32716ef4a5b12d25fa7d5f97a63bfcc8ab8a9bf1436e35048c56966 3198 hplip_3.19.12+dfsg0-4.dsc
 0ff12fff825ffd8c2518f28f72cc21e971d8689c4daf24c25c97126aa3f5676a 133052 hplip_3.19.12+dfsg0-4.debian.tar.xz
Files:
 1fdbfb4e53e6922ac4de69dc067249eb 3198 utils optional hplip_3.19.12+dfsg0-4.dsc
 b0aaeaf129b7a63075ed40c87ba65a50 133052 utils optional hplip_3.19.12+dfsg0-4.debian.tar.xz

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

iQIzBAEBCgAdFiEEJ3k7rA0YCplkx4gZqcb6xg1jAWkFAl40KMwACgkQqcb6xg1j
AWkGlg/+Pi+fvsPFBPQWmsrvWMgpTnbJxtOejJTNgRMCWAmBTru0iR2MlwByxj6f
aRblM7bAPgfhcqk5FCScac4z3ChYe6iqAWmpmayO+rPB+goaW6qnwFuIlE048KYs
5tIRcg6ZZEzS5r9z6qk4A7F2bqWH7uKMTpwNoFRIQG8PDyCs5jOBLXxHPhr8uoqP
lEiSHycW1YO6lPa6XtilX8MA7Ufy0wfJGnLyqjQs5klk3EbOltRTC3psrWM/lrHp
TuucDRx+7hbZL9Wjoo0uCO6cbdbQLb0/lAI9B1krAvZ0Ktc4htwC87uLznJxeOPu
3xcTM2zKydVPvF7ucFTdKGMoeLvq/SoIesKky5JwWnufcEWy+Fu3gKNT9Q3Eicak
Gb6Ha5mBg8ayJbupOGrsO4w5rcYZxML74i+Y8gou3TgnVVaznLyk4Yf51Nj9np45
1qN1NhOYTNzSUZhM24TU95vrH3fWNSM4hS/v08nC6zXJCnimKEUaDFq1k2bCwb1o
2gCpjxR23phg/2h8a+FxSJHDdZRdaZeRmSLHHIEPLTh/8nJpKJ1TJgdJBHqkQdRs
sZRbpmR9Gv9+cfRp2JVKsGRMGtaFSwj3K83lUswv79ir0XTppYt/YsK7EPNwr0HK
2w8WXOD1un/8ZyR6zQFjzhS6/xJ+Lcpcs9aFXjBFjZt+o57woNw=
=T/tS
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: