4

I recently installed Ubuntu 20.04 (fresh install) and installed hplip version 3.20.5 to connect my printer. Upon running hp-setup (gui) finds my printer and to click next but I run into an error below:

Searching... (bus=usb, search=(None), desc=0)
error: Unable to communicate with device (code=12): hpfax:/usb/OfficeJet_Pro_6970?serial=TH83O1P0WG
error: Unable to communicate with the device. Please check the device and try again.
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1104, in readwriteFaxInformation
    d.open()
  File "/usr/share/hplip/base/device.py", line 1185, in open
    raise Error(ERROR_DEVICE_NOT_FOUND)
base.g.Error: ('Device not found', 2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1305, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 729, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/share/hplip/ui5/setupdialog.py", line 1108, in readwriteFaxInformation
    if QMessageBox.critical(self,
TypeError: critical(QWidget, str, str, buttons: Union[QMessageBox.StandardButtons, QMessageBox.StandardButton] = QMessageBox.Ok, defaultButton: QMessageBox.StandardButton = QMessageBox.NoButton): argument 5 has unexpected type 'StandardButtons'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 130, in apport_excepthook
    with open(pr_filename, 'rb') as f:
PermissionError: [Errno 13] Permission denied: '/var/crash/_usr_share_hplip_setup.py.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1104, in readwriteFaxInformation
    d.open()
  File "/usr/share/hplip/base/device.py", line 1185, in open
    raise Error(ERROR_DEVICE_NOT_FOUND)

When I run hp-check i get the following:

OfficeJet_Pro_6970_TH83O1P0WG_

Type: Unknown
Device URI: implicitclass://OfficeJet_Pro_6970_TH83O1P0WG_/
PPD: /etc/cups/ppd/OfficeJet_Pro_6970_TH83O1P0WG_.ppd
warning: Failed to read /etc/cups/ppd/OfficeJet_Pro_6970_TH83O1P0WG_.ppd ppd file
PPD Description: 
Printer status: printer OfficeJet_Pro_6970_TH83O1P0WG_ is idle.  enabled since Thu 21 May 2020 08:04:45 AM PDT
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.

I enabled permissions for the ppd file but still same problem. Any thoughts would be appreciated.

UPDATE:

So fully fresh install again, I wiped out all traces of previous versions of hplip and everything worked fine on installation. Unfortunately upon using the gui, although it finds the device, when I hit next, terminal spits this out below. The gui does nothing and the next button turns into an Add Printer button although the printer is still listed above.

error: Unable to communicate with device (code=12): hpfax:/usb/OfficeJet_Pro_6970?serial=TH83O1P0WG
error: Unable to communicate with the device. Please check the device and try again.
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1104, in readwriteFaxInformation
    d.open()
  File "/usr/share/hplip/base/device.py", line 1185, in open
    raise Error(ERROR_DEVICE_NOT_FOUND)
base.g.Error: ('Device not found', 2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1305, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 729, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/share/hplip/ui5/setupdialog.py", line 1108, in readwriteFaxInformation
    if QMessageBox.critical(self,
TypeError: critical(QWidget, str, str, buttons: Union[QMessageBox.StandardButtons, QMessageBox.StandardButton] = QMessageBox.Ok, defaultButton: QMessageBox.StandardButton = QMessageBox.NoButton): argument 5 has unexpected type 'StandardButtons'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 130, in apport_excepthook
    with open(pr_filename, 'rb') as f:
PermissionError: [Errno 13] Permission denied: '/var/crash/_usr_share_hplip_setup.py.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1104, in readwriteFaxInformation
    d.open()
  File "/usr/share/hplip/base/device.py", line 1185, in open
    raise Error(ERROR_DEVICE_NOT_FOUND)
base.g.Error: ('Device not found', 2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1305, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 729, in showAddPrinterPage
    self.readwriteFaxInformation()
  File "/usr/share/hplip/ui5/setupdialog.py", line 1108, in readwriteFaxInformation
    if QMessageBox.critical(self,
TypeError: critical(QWidget, str, str, buttons: Union[QMessageBox.StandardButtons, QMessageBox.StandardButton] = QMessageBox.Ok, defaultButton: QMessageBox.StandardButton = QMessageBox.NoButton): argument 5 has unexpected type 'StandardButtons'
Jeremy
  • 41
  • 1
  • 4
  • How did you installed HPLIP? From APT or from binary .run? – N0rbert May 21 '20 at 16:56
  • 1
    i downloaded the .run file from hp and ran it in terminal. I should add that i originally installed hplip-3.20.3 but it had some issue so i removed it and then installed hplip-3.20.5 – Jeremy May 21 '20 at 17:19
  • I do not have HP devices near me at time of writing, but usually deb-packaged version works normally, And your device needs >=3.16.8 so 3.20.3 should work too. You can try binary driver removal and deb-package installation as described in my answer. Not sure about success. – N0rbert May 21 '20 at 17:43
  • I removed and purged everything regarding hp and trying to do fresh install of hplip-3.20.5 but during installation is says that it found hplip-3.20.3 and there might be a conflict. I can't find any reference to hplip3.20.3 on my computer so i'm not sure what to do. I get this during installation as well: |Gtk-Message: 11:46:42.803: Failed to load module "canberra-gtk-module" – Jeremy May 21 '20 at 19:01
  • 1
    When i try to add the printer I still get a communication error. It finds the Printer but then says communication error. – Jeremy May 21 '20 at 20:01
  • 1
    did you fix it ? – mikakun Jun 17 '20 at 22:36
  • 1
    Unfortunately I never did fix this issue. It was working for a little bit but stopped randomly one day. I was, however, able to successfully install the printer but it still won't print. My work around is to use the WiFi Direct feature and print from my mobile device. Whenever I hit print from the computer, nothing happens. I getting ready to upgrade to 22.04 so maybe it will clear up then. – Jeremy Aug 23 '22 at 04:11

1 Answers1

0

About canberra - use

sudo apt-get install libcanberra-gtk-module libcanberra-gtk-module:i386 
sudo apt-get install libcanberra-gtk3-module libcanberra-gtk3-module:i386

About HPLIP - use Uninstallation part of other answer and install hplip-gui package. I do not see any removal notices about OfficeJet Pro 6970 in the releases notes, so it simply should work.

N0rbert
  • 99,918
  • I got the libcanberra-gtk issue resolved but the original issue still remains. Please see the UPDATE section above to my original post. Thank you so much. – Jeremy May 23 '20 at 23:30