hplip-3.11.1 - hp-setup fails on adding printer with fax capabilities

Bug #707655 reported by Daniel Pielmeier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
Fix Released
Undecided
Gaurav Sood
Gentoo Linux
Fix Released
Medium

Bug Description

See summary.

I am opening this bug for a Gentoo User, who was unable to register here because he could not get past the captcha and thus could not create an account here. I will add the link to the Gentoo bug which also includes a patch that fixes the issue.

Revision history for this message
In , Bas-lijer (bas-lijer) wrote :

After starting hp-setup and finding a printer (officejet 6500) it crashes with a Traceback.

Traceback (most recent call last):
  File "/usr/share/hplip/ui4/setupdialog.py", line 1235, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui4/setupdialog.py", line 680, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/share/hplip/ui4/setupdialog.py", line 1059, in readwriteFaxInformation
    self.fax_name_company = unicode(d.getStationName())
  File "/usr/share/hplip/fax/ledmfax.py", line 134, in getStationName
    return self.readAttributeFromXml("/DevMgmt/FaxConfigDyn.xml",'faxcfgdyn:faxconfigdyn-faxcfgdyn:systemsettings-dd:companyname')
  File "/usr/share/hplip/base/device.py", line 2465, in readAttributeFromXml
    return str(xmlDict[attribute])
KeyError: 'faxcfgdyn:faxconfigdyn-faxcfgdyn:systemsettings-dd:companyname'

Reproducible: Always

Steps to Reproduce:
1. Start hp-setup
2. Choose network/ethernet click next
3. Printer is found
4. Click next

Actual Results:
Traceback (most recent call last):
  File "/usr/share/hplip/ui4/setupdialog.py", line 1235, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui4/setupdialog.py", line 680, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/share/hplip/ui4/setupdialog.py", line 1059, in readwriteFaxInformation
    self.fax_name_company = unicode(d.getStationName())
  File "/usr/share/hplip/fax/ledmfax.py", line 134, in getStationName
    return self.readAttributeFromXml("/DevMgmt/FaxConfigDyn.xml",'faxcfgdyn:faxconfigdyn-faxcfgdyn:systemsettings-dd:companyname')
  File "/usr/share/hplip/base/device.py", line 2465, in readAttributeFromXml
    return str(xmlDict[attribute])
KeyError: 'faxcfgdyn:faxconfigdyn-faxcfgdyn:systemsettings-dd:companyname'

Expected Results:
Printer is added.

This did not happen with 3.10 (but there was no fax support yet for the OfficeJet 6500)

Revision history for this message
In , Bas-lijer (bas-lijer) wrote :

The following patch seems to fix the problem. Apparently some items can be None which causes an error

# diff -u /usr/share/hplip/base/device.py device.py
--- /usr/share/hplip/base/device.py 2011-01-25 14:51:16.000000000 +0100
+++ device.py 2011-01-25 14:50:18.000000000 +0100
@@ -2462,7 +2462,13 @@
             log.error("Unable To read the XML data from device")
             return ""
         xmlDict = utils.XMLToDictParser().parseXML(data)
- return str(xmlDict[attribute])
+
+ try:
+ rA = xmlDict[attribute]
+ except KeyError:
+ rA = ""
+
+ return str(rA)

     def downloadFirmware(self, usb_bus_id=None, usb_device_id=None): # Note: IDs not currently used
         ok = False

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

Thank you very much for your report. I would appreciate if you open a bug upstream [1] about this issue and report the Bug URL here. If the bug is confirmed I can add the patch to the ebuild.

[1] https://bugs.launchpad.net/hplip

Revision history for this message
In , Bas-lijer (bas-lijer) wrote :

(In reply to comment #2)
> Thank you very much for your report. I would appreciate if you open a bug
> upstream [1] about this issue and report the Bug URL here. If the bug is
> confirmed I can add the patch to the ebuild.
>
> [1] https://bugs.launchpad.net/hplip
>

Sounds like a good idea, unfortunately I am unable to get past the captcha and cannot create an account.

Anyway, just letting you know.

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

(In reply to comment #3)
>
> Sounds like a good idea, unfortunately I am unable to get past the captcha and
> cannot create an account.
>
> Anyway, just letting you know.
>

Thanks for letting me know. I opened bug 707655 [1] for you. I hope you tried more than once to answer the captcha. I remember I needed a few attempts there as well.

[1] https://bugs.launchpad.net/hplip/+bug/707655

Revision history for this message
In , Bas-lijer (bas-lijer) wrote :

(In reply to comment #4)
> Thanks for letting me know. I opened bug 707655 [1] for you. I hope you tried
> more than once to answer the captcha. I remember I needed a few attempts there
> as well.
>
> [1] https://bugs.launchpad.net/hplip/+bug/707655
>

Thanks! (I stopped trying after 12 or so times.)

Changed in gentoo:
status: Unknown → Confirmed
Changed in hplip:
status: New → In Progress
assignee: nobody → shunmugaraj (shunmugaraj83)
Revision history for this message
shunmugaraj (shunmugaraj83) wrote :

Hi Daniel Pielmeier,

I tried the to setup a printer in our environment, but i could not reproduce the issue. Can you please let me know detailed description about the software version you used.

Thanks and Regards,
Raj

Revision history for this message
Daniel Pielmeier (daniel-pielmeier) wrote :

Well the user in question did use hplip-3.11.1 like the summary states. I can request the output of hp-check. Is there anything else you need.

Changed in gentoo:
importance: Unknown → Medium
Revision history for this message
shunmugaraj (shunmugaraj83) wrote :

Hi Daniel,

Sorry for the late reply, i tried reproducing the defect but i could. Please pass on the information you have. I will try my best.

Thanks and Regards,
Raj

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

Can you please attach the output of hp-check. I will forward this information to the upstream bug.

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

@Bas: We can not proceed without the information I requested in comment #6.

Changed in gentoo:
status: Confirmed → Unknown
Revision history for this message
In , Bas-lijer (bas-lijer) wrote :

Created attachment 268701
Output of hp-check.log

Revision history for this message
In , Bas-lijer (bas-lijer) wrote :

Sorry I missed the last comments requesting for information.

The problem stil persists in hplip 3.11.3a

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

Thanks for the information. Reopening.

Changed in gentoo:
status: Unknown → Confirmed
Revision history for this message
In , Yrusinov (yrusinov) wrote :

Possible I duplicate this bug here https://bugs.gentoo.org/show_bug.cgi?id=381475.

Changed in gentoo:
status: Confirmed → Unknown
Revision history for this message
In , Eric Carter (ecarter) wrote :

Struggled for hours with this until I found a helpful comment. Do you have an "&" in your fax company name - if so get rid of it and it should all work.

Revision history for this message
Sarbeswar Meher (sarbeswar-meher) wrote :

Hi,

  Please install the latest hplip-3.11.12 from http://hplipopensource.com/hplip-web/install/manual/distros/gentoo.html with the installation steps mentioned. Let us know if you are able to reproduce this issue.

Changed in hplip:
assignee: shunmugaraj (shunmugaraj83) → Gaurav Sood (gaurav-sood)
Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

Is this still a problem with hpli-3.11.12-r2?

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

I just added hplip-3.12.2. Please try this version instead.

Changed in hplip:
status: In Progress → Fix Committed
Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

According to the upstream bug and by reviewing the code this bug has been fixed. Closing!

Changed in gentoo:
status: Unknown → Fix Released
Changed in hplip:
status: Fix Committed → Fix Released
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.