bad error logging when hpfax/hpps initialization fails

Bug #1201767 reported by Jiri Popelka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned
Fedora
Fix Released
Undecided

Bug Description

Steps to reproduce:
# mv /etc/hp/hplip.conf /etc/hp/hplip.conf_backup
# /usr/lib/cups/backend/hpfax

Actual results:
Traceback (most recent call last):
  File "/usr/lib/cups/backend/hpfax", line 68, in <module>
    bug("Error setting home directory: /etc/hp/hplip.conf not found")
  File "/usr/lib/cups/backend/hpfax", line 55, in bug
    log.stderr("ERROR: %s\n" % msg)
NameError: global name 'log' is not defined

Revision history for this message
In , Antonio (antonio-redhat-bugs-1) wrote :

Version-Release number of selected component:
hplip-3.13.6-2.fc19

Additional info:
reporter: libreport-2.1.5
cmdline: /usr/bin/python /usr/lib/cups/backend/hpfax
executable: /usr/lib/cups/backend/hpfax
kernel: 3.9.9-302.fc19.x86_64
runlevel: N 5
uid: 0

Truncated backtrace:
hpfax:55:bug:NameError: global name 'log' is not defined

Traceback (most recent call last):
  File "/usr/lib/cups/backend/hpfax", line 68, in <module>
    bug("Error setting home directory: /etc/hp/hplip.conf not found")
  File "/usr/lib/cups/backend/hpfax", line 55, in bug
    log.stderr("ERROR: %s\n" % msg)
NameError: global name 'log' is not defined

Local variables in innermost frame:
msg: 'Error setting home directory: /etc/hp/hplip.conf not found'

Revision history for this message
In , Antonio (antonio-redhat-bugs-1) wrote :

Created attachment 773853
File: backtrace

Revision history for this message
In , Antonio (antonio-redhat-bugs-1) wrote :

Created attachment 773854
File: core_backtrace

Revision history for this message
In , Antonio (antonio-redhat-bugs-1) wrote :

Created attachment 773855
File: environ

Revision history for this message
Jiri Popelka (jpopelka) wrote :
Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

Antonio, your /etc/hp/hplip.conf file is missing.
Please reinstall hplip-common with this command:
# yum reinstall hplip-common
and try to reproduce the problem.

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

> File "/usr/lib/cups/backend/hpfax", line 55, in bug
> log.stderr("ERROR: %s\n" % msg)
> NameError: global name 'log' is not defined

Reported upstream as https://bugs.launchpad.net/bugs/1201767

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

*** Bug 1015977 has been marked as a duplicate of this bug. ***

Revision history for this message
Jiri Popelka (jpopelka) wrote :

The same problem applies to prnt/filters/hpps

Traceback (most recent call last):
  File "/usr/lib/cups/filter/hpps", line 86, in <module>
    bug("Error importing HPLIP modules:%s %s\n" % (pid, e))
  File "/usr/lib/cups/filter/hpps", line 52, in bug
    log.stderr("ERROR: %s" % m)
NameError: global name 'log' is not defined

Local variables in innermost frame:
m: 'Error importing HPLIP modules:2972 No module named base.g\n'

Revision history for this message
Jiri Popelka (jpopelka) wrote :
summary: - bad error logging when hpfax initialization fails
+ bad error logging when hpfax/hpps initialization fails
Revision history for this message
In , Jonathan (jonathan-redhat-bugs) wrote :

so I can't print anything thanks to a year-old bug. Ah well, maybe *2015* will be Year of Linux Desktop :(

Revision history for this message
In , Tim (tim-redhat-bugs) wrote :

What does 'ls -l /etc/hp' say? If you're running into this I think it means a config file has gone missing.

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

(In reply to Jonathan Nicol from comment #7)
> so I can't print anything thanks to a year-old bug.

This bug causes that in some cases hplip is not able to write error message into log. This bug does not influence printing itself.

> Ah well, maybe *2015* will be Year of Linux Desktop :(

Might be if you're able to provide some info leading to identification of your problem.
https://fedoraproject.org/wiki/How_to_debug_printing_problems

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

hplip-3.14.4-5.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/FEDORA-2014-6291/hplip-3.14.4-5.fc20

Revision history for this message
In , Jonathan (jonathan-redhat-bugs) wrote :

aha, the gnome printer config program installed hpijs and hplip-common for me; I had to manually install hplip. Now I can print :)

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

Thanks Jonathan,

your problem looks like bug #1094530.
We probably need to move something from hplip package into hplip-common, but I've no idea what.

It'd be great if you could remove the hplip again and try to print something via printing troubleshooter [1]. Attach the output into bug #1094530. Then you can install hplip back. Thanks.

[1] https://fedoraproject.org/wiki/How_to_debug_printing_problems#Printing_troubleshooter

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

Package hplip-3.14.4-5.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hplip-3.14.4-5.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6291/hplip-3.14.4-5.fc20
then log in and leave karma (feedback).

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

Package hplip-3.14.6-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hplip-3.14.6-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6291/hplip-3.14.6-1.fc20
then log in and leave karma (feedback).

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

Package hplip-3.14.6-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hplip-3.14.6-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6291/hplip-3.14.6-2.fc20
then log in and leave karma (feedback).

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

hplip-3.14.6-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.

Changed in fedora:
importance: Unknown → Undecided
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.