Bug 2192131

Summary: parseQueues() doesn't get device uri from 'lpstat -v', because parsing pattern changed
Product: [Fedora] Fedora Reporter: Ahmad Javid <Ahmad.javid>
Component: hplipAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: Ahmad.javid, aoellerer, jridky, tkorbar, twaugh, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/6353a6007ba3d312fedb29cc1eb6745ee4ca4aa
Whiteboard: abrt_hash:5506b05b1d2e3a73aaa4c771222378fd5090a846;VARIANT_ID=workstation;
Fixed In Version: hplip-3.23.5-8.fc38 hplip-3.23.5-8.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-07 01:26:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: os_info
none
File: environ
none
File: mountinfo
none
File: open_fds
none
File: namespaces
none
File: backtrace
none
File: cpuinfo
none
Proposed patch none

Description Ahmad Javid 2023-04-29 20:02:16 UTC
Description of problem:
Not Load xsane app
and error for the scan paper

Version-Release number of selected component:
hplip-3.22.10-4.fc38

Additional info:
reporter:       libreport-2.17.9
kernel:         6.2.11-300.fc38.x86_64
cmdline:        /usr/bin/python3 /usr/bin/hp-diagnose_queues --gui
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-gnome-hplip-58280.scope
uid:            1000
reason:         queues.py:115:parseQueues:AttributeError: 'NoneType' object has no attribute 'startswith'
executable:     /usr/bin/hp-diagnose_queues
type:           Python3
package:        hplip-3.22.10-4.fc38
runlevel:       N 5
exception_type: AttributeError
crash_function: parseQueues
interpreter:    python3-3.11.2-1.fc38.x86_64

Truncated backtrace:
queues.py:115:parseQueues:AttributeError: 'NoneType' object has no attribute 'startswith'

Traceback (most recent call last):
  File "/usr/bin/hp-diagnose_queues", line 120, in <module>
    queues.main_function(passwordObj, mode,ui_toolkit, quiet_mode )
  File "/usr/share/hplip/base/queues.py", line 385, in main_function
    mapofDevices,status = parseQueues(mode)
                          ^^^^^^^^^^^^^^^^^
  File "/usr/share/hplip/base/queues.py", line 115, in parseQueues
    if device_uri.startswith("cups-pdf:/"):
       ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'

Local variables in innermost frame:
mode: 1
is_hpcups_installed: True
is_hpijs_installed: False
st: 0
output: 'device for HP_LaserJet_Pro_MFP_M127fn: hp:/usb/HP_LaserJet_Pro_MFP_M127fn?serial=CNB9G9B4P8\r\ndevice for HP_LaserJet_Pro_MFP_M127fn-JAVID: hp:/usb/HP_LaserJet_Pro_MFP_M127fn?serial=CNB9G9B4P8\r\ndevice for HP_LaserJet_Pro_MFP_M127fn_fax: hpfax:/usb/HP_LaserJet_Pro_MFP_M127fn?serial=CNB9G9B4P8\r\ndevice for HP_LaserJet_Pro_MFP_M127fn_fax-JAVID: hpfax:/usb/HP_LaserJet_Pro_MFP_M127fn?serial=CNB9G9B4P8\r\n'
status: True
cups_printers: [('HP_LaserJet_Pro_MFP_M127fn', None), ('HP_LaserJet_Pro_MFP_M127fn-JAVID', None), ('HP_LaserJet_Pro_MFP_M127fn_fax', None), ('HP_LaserJet_Pro_MFP_M127fn_fax-JAVID', None)]
p: ('HP_LaserJet_Pro_MFP_M127fn', None)
match: <re.Match object; span=(11, 104), match='HP_LaserJet_Pro_MFP_M127fn_fax-JAVID: hpfax:/usb/>
printer_name: 'HP_LaserJet_Pro_MFP_M127fn'
device_uri: None

Comment 1 Ahmad Javid 2023-04-29 20:02:20 UTC
Created attachment 1961022 [details]
File: os_info

Comment 2 Ahmad Javid 2023-04-29 20:02:22 UTC
Created attachment 1961023 [details]
File: environ

Comment 3 Ahmad Javid 2023-04-29 20:02:24 UTC
Created attachment 1961024 [details]
File: mountinfo

Comment 4 Ahmad Javid 2023-04-29 20:02:25 UTC
Created attachment 1961025 [details]
File: open_fds

Comment 5 Ahmad Javid 2023-04-29 20:02:27 UTC
Created attachment 1961026 [details]
File: namespaces

Comment 6 Ahmad Javid 2023-04-29 20:02:29 UTC
Created attachment 1961027 [details]
File: backtrace

Comment 7 Ahmad Javid 2023-04-29 20:02:31 UTC
Created attachment 1961028 [details]
File: cpuinfo

Comment 8 Zdenek Dohnal 2023-07-14 10:44:19 UTC
*** Bug 2176910 has been marked as a duplicate of this bug. ***

Comment 9 Zdenek Dohnal 2023-07-14 12:43:58 UTC
Created attachment 1975792 [details]
Proposed patch

Comment 10 Zdenek Dohnal 2023-07-20 14:20:36 UTC
Fixed in rawhide for now, I will propagate it to the stable releases https://bodhi.fedoraproject.org/updates/FEDORA-2023-077b459bc2 .

Comment 11 Fedora Update System 2023-07-28 08:16:35 UTC
FEDORA-2023-5de7dea2a5 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-5de7dea2a5

Comment 12 Fedora Update System 2023-07-28 08:48:22 UTC
FEDORA-2023-dec484f9d2 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-dec484f9d2

Comment 13 Fedora Update System 2023-07-29 02:17:39 UTC
FEDORA-2023-5de7dea2a5 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-5de7dea2a5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-5de7dea2a5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2023-07-29 02:19:22 UTC
FEDORA-2023-dec484f9d2 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-dec484f9d2`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-dec484f9d2

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2023-08-05 02:14:22 UTC
FEDORA-2023-5f9104efcd has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-5f9104efcd`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-5f9104efcd

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2023-08-05 02:34:17 UTC
FEDORA-2023-8144e3fe2f has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-8144e3fe2f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-8144e3fe2f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2023-08-07 01:26:23 UTC
FEDORA-2023-5f9104efcd has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2023-08-12 04:23:47 UTC
FEDORA-2023-8144e3fe2f has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.