我最近安装了 Ubuntu 20.04(全新安装),并安装了 hplip 版本 3.20.5 来连接我的打印机。运行 hp-setup(gui)后,找到我的打印机并单击下一步,但我遇到以下错误:
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)
当我运行 hp-check 时,我得到以下信息:
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.
我启用了 ppd 文件的权限,但问题仍然存在。任何想法都将不胜感激。
更新:
因此,我再次全新安装,清除了 hplip 以前版本的所有痕迹,安装时一切正常。不幸的是,在使用 GUI 时,虽然它找到了设备,但当我点击下一步时,终端会在下面显示此信息。GUI 什么也不做,下一步按钮变成了添加打印机按钮,尽管打印机仍然列在上面。
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'