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)
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
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
(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.
(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
(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.)
Can you please attach the output of hp-check. I will forward this information to the upstream bug.
@Bas: We can not proceed without the information I requested in comment #6.
Created attachment 268701 [details] Output of hp-check.log
Sorry I missed the last comments requesting for information. The problem stil persists in hplip 3.11.3a
Thanks for the information. Reopening.
Possible I duplicate this bug here https://bugs.gentoo.org/show_bug.cgi?id=381475.
Is this still a problem with hpli-3.11.12-r2?
I just added hplip-3.12.2. Please try this version instead.
According to the upstream bug and by reviewing the code this bug has been fixed. Closing!