You are not logged in.

#1 2018-08-07 07:15:43

raavas
Member
Registered: 2011-10-21
Posts: 78

[solved] Hp-doctor not working after update on 07.08.18

After the large python update on the 07.08.18, my hp-doctor doesn't work anymore. It gives the following error:

|Traceback (most recent call last):
  File "/usr/share/hplip/base/utils.py", line 266, in walkFiles
    names = os.listdir(root)
FileNotFoundError: [Errno 2] No such file or directory: '/etc/PolicyKit'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/hplip/base/utils.py", line 268, in walkFiles
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/hp-doctor", line 276, in <module>
    dep.core.init()
  File "/usr/share/hplip/installer/core_install.py", line 500, in init
    self.check_dependencies(callback)
  File "/usr/share/hplip/installer/core_install.py", line 593, in check_dependencies
    self.have_dependencies[d] = self.dependencies[d][3]()
  File "/usr/share/hplip/installer/core_install.py", line 1164, in check_policykit
    if check_file('PolicyKit.conf', "/etc/PolicyKit") and check_file('org.gnome.PolicyKit.AuthorizationManager.service', "/usr/share/dbus-1/services"):
  File "/usr/share/hplip/installer/dcheck.py", line 108, in check_file
    for w in utils.walkFiles(dir, recurse=True, abs_paths=True, return_folders=False, pattern=f):
RuntimeError: generator raised StopIteration

How can I fix this?

Last edited by raavas (2019-03-28 20:22:10)

Offline

#2 2018-08-07 14:18:35

berturion
Member
Registered: 2018-06-19
Posts: 12

Re: [solved] Hp-doctor not working after update on 07.08.18

Same problem here. I discovered hp-doctor command when I wanted to diagnose a printing problem today. I think my printing problem is also related to the python update. I have 2 laptops running arch linux, 5 days ago they both were able to print but not since today (didn't tried before).
My printer is an HP ENVY 5530 Series connected on Wifi.
Even the Print Test Page is not working. Although, HP Device Manager says "Print job has completed" and cups reports the printer status as "Inoccupée - Rendering completed".
I tried :
- uninstalling and reinstalling hplip
- removing then re-adding the printer using cups web interface
- re-adding the printer with hp-setup 192.168.1.12
None of these actions worked.

Last edited by berturion (2018-08-07 14:19:19)

Offline

#3 2018-08-07 16:23:53

loqs
Member
Registered: 2014-03-06
Posts: 12,987

Re: [solved] Hp-doctor not working after update on 07.08.18

https://bugs.archlinux.org/task/59548#comment171806
Edit:
If you replace /usr/share/hplip/base/utils.py" line 268

        raise StopIteration

with

        return

Does that fix the error?

Last edited by loqs (2018-08-07 17:31:09)

Offline

#4 2018-08-07 19:44:26

raavas
Member
Registered: 2011-10-21
Posts: 78

Re: [solved] Hp-doctor not working after update on 07.08.18

The above fix works for me. Thank you!

Also, for the record, I use hp-doctor to revive my scanner after hplip upgrades and plugin updates. I got the plugin updated manually from AUR and my scanner working, but the above fix solved the hp-doctor problem.

I won't mark as solved because berturion's problem above - otherwise I am good to go.

Offline

#5 2019-03-28 12:56:10

raavas
Member
Registered: 2011-10-21
Posts: 78

Re: [solved] Hp-doctor not working after update on 07.08.18

And we are back at the problem, this time it is similar:

Traceback (most recent call last):
  File "/usr/bin/hp-doctor", line 297, in <module>
    num_errors, num_warns = dep.validate(DEPENDENCY_RUN_AND_COMPILE_TIME, False)
  File "/usr/share/hplip/check.py", line 368, in validate
    self.core.dependencies[dep])
  File "/usr/share/hplip/check.py", line 210, in __update_deps_info
    installed_ver = self.core.version_func[deps_info[6]]()
  File "/usr/share/hplip/installer/dcheck.py", line 303, in get_pyQt4_version
    from PyQt4 import QtCore
ModuleNotFoundError: No module named 'PyQt4.sip'

I assume that the previous fix above doesn't clear this one?

Offline

#6 2019-03-28 13:07:48

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 1,774

Re: [solved] Hp-doctor not working after update on 07.08.18

This has nothing to do with your original issue

Offline

#7 2019-03-28 13:08:34

raavas
Member
Registered: 2011-10-21
Posts: 78

Re: [solved] Hp-doctor not working after update on 07.08.18

Ok, now I need to know how to fix it.

Offline

#8 2019-03-28 13:12:21

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 1,774

Re: [solved] Hp-doctor not working after update on 07.08.18

You have a broken pyqt4 installation. Check the pyqt4 AUR page for some hints.

Offline

#9 2019-03-28 20:21:46

raavas
Member
Registered: 2011-10-21
Posts: 78

Re: [solved] Hp-doctor not working after update on 07.08.18

Thanks very much, found the solution.

I reinstalled pyqt4 with instructions from the AUR page. Now let's hope that hp-doctor can fix my scanner...

Offline

Board footer

Powered by FluxBB