So I had this problem – or a very similar one – about 6 or 7 months ago. After doing some research here, and also at the HPLIPS project on SourceForge, I decided to go ahead and upgrade to LEAP 15.0 (from 42.3). Alas. My problem persists!
I did the upgrade as instructed, and everything appeared to go smoothly. I can get to my printer (HP m1522nf) through the print dialog, and it prints OK. When I ran YAST for my scanner (built into the printer), it told me it had registered my HP printer as my scanner device, and it had associated a driver “hpaio” with it. But when I tried to run XSANE and/or SKANLITE, I got an error message – “no scanner device detected.” And when I went back to YAST, “hpaio” was still there, but the association with hp m1522nf had vanished. So I tried to add my print device as a scanner, and I was told “you must install hplip”. So I did that, but YAST still couldn’t find my scanner.
Here’s the output from the “Install log”.
Downloading hplip (download size 11.20 MiB)
Installing hplip-3.18.6-lp150.4.3.1.x86_64.rpm (installed size 15.97 MiB)
[From YAST, 14:05 CDT 6/20/2019]
So now the symbol for “hplip” appeared in the launcher menu, but when I clicked on that, nothing happened. So I started a Konsole session and tried to start the program that way. Here’s what happened.
david@linux-v95w:~> hp-toolbox
error: Unable to locate models.dat file
HP Linux Imaging and Printing System (ver. 0.0.0)
HP Device Manager ver. 15.0
Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
Traceback (most recent call last):
File "/usr/bin/hp-toolbox", line 269, in <module>
QApplication, ui_package = utils.import_dialog(ui_toolkit)
TypeError: 'NoneType' object is not iterable
[From Konsole when I try to invoke hplip manually]
So I figured that maybe “hp-setup” would work. But it gives me the same error.
david@linux-v95w:~> hp-setup
error: Unable to locate models.dat file
...
Using connection type: usb
error: No device selected/specified or that supports this functionality.
So I read the help file for hp-setup, and after failing to get the —gui option to work, I just specified the location of my printer directly.
david@linux-v95w:~> hp-setup -i 192.168.1.5
error: Unable to locate models.dat file
HP Linux Imaging and Printing System (ver. 0.0.0)
Printer/Fax Setup Utility ver. 9.0
Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.
(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)
Traceback (most recent call last):
File "/usr/share/hplip/base/models.py", line 555, in __getitem__
return self.__cache[model]
KeyError: 'hp_laserjet_m1522nf_mfp'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/hp-setup", line 358, in <module>
device_uri, sane_uri, fax_uri = device.makeURI(param, jd_port)
File "/usr/share/hplip/base/device.py", line 417, in makeURI
mq = queryModelByURI(cups_uri)
File "/usr/share/hplip/base/device.py", line 458, in queryModelByURI
return queryModelByModel(model)
File "/usr/share/hplip/base/device.py", line 447, in queryModelByModel
return model_dat[model]
File "/usr/share/hplip/base/models.py", line 561, in __getitem__
if self.read_section(self.released_dat, model):
File "/usr/share/hplip/base/models.py", line 471, in read_section
fd = open(filename)
TypeError: expected str, bytes or os.PathLike object, not NoneType
from which I infer, perhaps incorrectly, that there’s supposed to be a file called “models.dat” somewhere in the hplip.xxx.rpm file, and that either it’s not there, or the package manager is failing to extract / install it properly.
Any ideas how to fix it? I guess I’ll go monkey around with the “make” file from SoiurceForge. In fact, I took a look over there already, and saw this in the “Release Notes” for version 3.19.1:
Added support for following new Distro’s:
- Fedora 29(64-bit)
- Open Suse 15(64-bit)
- Manjaro 18.0(64-bit)
- RHEL 7.2(64-bit)
which leaves me wondering why the package from OpenSuse says “3.18.6” – not that I’m complaining – just curious.