hplip- error programm

Bug #1085715 reported by giovanni
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HPLIP
In Progress
Undecided
Unassigned

Bug Description

ubuntu 12.04 lts
hp laserjet p1102
when I turn my pc on i get error messages.

gio@gio-G31T-M2:~$ hp-check -t
error: Unable to locate models.dat file

HP Linux Imaging and Printing System (ver. 0.0.0)
Dependency/Version Check Utility ver. 15

Copyright (c) 2001-14 Hewlett-Packard 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: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the
HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies
are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro
supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball
has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode
will check both of the above cases (both compile- and run-time dependencies).

Check types:
a. EXTERNALDEP - External Dependencies
b. GENERALDEP - General Dependencies (required both at compile and run time)
c. COMPILEDEP - Compile time Dependencies
d. [All are run-time checks]
PYEXT SCANCONF QUEUES PERMISSION

Status Types:
    OK
    MISSING - Missing Dependency or Permission or Plug-in
    INCOMPAT - Incompatible dependency-version or Plugin-version

Saving output in log file: /home/gio/hp-check.log

Initializing. Please wait...
Traceback (most recent call last):
  File "/usr/bin/hp-check", line 503, in <module>
    core.init()
  File "/usr/share/hplip/installer/core_install.py", line 418, in init
    self.distro_name = self.distros_index[self.distro]
KeyError: 0
gio@gio-G31T-M2:~$

Revision history for this message
Amarnath Chitumalla (amarnath-chitumalla) wrote :

Hi,

Seems like some the HPLIP files might be corrupted or not present in your system.

Can you please re-install HPLIP from "http://hplipopensource.com/hplip-web/install/install/index.html"

Thanks & regards,
Amarnath

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

> Seems like some the HPLIP files might be corrupted or not present in your system.

I too thought that it was some 'package integrity' problem when seeing
https://bugzilla.redhat.com/show_bug.cgi?id=632827#c0
but then I saw it also in
https://bugzilla.redhat.com/show_bug.cgi?id=879925#c0
and now in this report, where the reporter uses different distro.

Revision history for this message
giovanni (giolombardo) wrote : Re: [Bug 1085715] Re: hplip- error programm

thank you very much for your replies.
Now it works, but I am quite sure I will face the problem after the next
update/upgrade.
As far as I can understand, there is a conflict with python.

2012/12/3 Jiri Popelka <email address hidden>

> > Seems like some the HPLIP files might be corrupted or not present in
> your system.
>
> I too thought that it was some 'package integrity' problem when seeing
> https://bugzilla.redhat.com/show_bug.cgi?id=632827#c0
> but then I saw it also in
> https://bugzilla.redhat.com/show_bug.cgi?id=879925#c0
> and now in this report, where the reporter uses different distro.
>
> ** Bug watch added: Red Hat Bugzilla #632827
> https://bugzilla.redhat.com/show_bug.cgi?id=632827
>
> ** Bug watch added: Red Hat Bugzilla #879925
> https://bugzilla.redhat.com/show_bug.cgi?id=879925
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1085715
>
> Title:
> hplip- error programm
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/hplip/+bug/1085715/+subscriptions
>

Revision history for this message
giovanni (giolombardo) wrote :

thank you very much for your replies.
Now it works, but I am quite sure I will face the problem after the next update/upgrade.
As far as I can understand, there is a conflict with python.

Revision history for this message
giovanni (giolombardo) wrote :

when I turn my pc on I get this error message:

Revision history for this message
Amarnath Chitumalla (amarnath-chitumalla) wrote :

Hi,

I didn't get the error message which is shown in png attachment. Please let me know.

Can you please check whether following file exists or not?
1) /usr/share/hplip/config_usb_printer.py
2) /etc/udev/rules.d/56-hpmud_add_printer.rules

Also send us following command outputs
1) hp-check
2) attach "/usr/share/hplip/config_usb_printer.py" file
3) attach "/etc/udev/rules.d/56-hpmud_add_printer.rules" file.

Let us know what did you update/upgrade, is it like distro updates or HPLIP upgrade?
Help us in understanding the issue by providing the exact steps to reproduce.

Thanks & Regards,
Amarnath

Changed in hplip:
status: New → In Progress
Revision history for this message
giovanni (giolombardo) wrote :
Download full text (10.6 KiB)

Troubles began updating Ubuntu.
I enclose the requested files

#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) Copyright 2011-2014 Hewlett-Packard Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Author: Amarnath Chitumalla
#

__version__ = '1.0'
__title__ = 'HP device setup using USB'
__mod__ = 'hp-config_usb_printer'
__doc__ = "Detects HP printers connected using USB and installs HPLIP printers and faxes in the CUPS spooler. Tries to automatically determine the correct PPD file to use."

# Std Lib
import sys
import os
import getopt
import commands
import re
import time

# Local
from base.g import *
from base import device,utils, tui, models,module
from prnt import cups

LPSTAT_PAT = re.compile(r"""(\S*): (.*)""", re.IGNORECASE)
USB_PATTERN = re.compile(r'''serial=(.*)''',re.IGNORECASE)
BACK_END_PATTERN = re.compile(r'''(.*):(.*)''',re.IGNORECASE)
DBUS_SERVICE='com.hplip.StatusService'

##### METHODS #####

# Returns already existing print queues for this printer.
def get_already_added_queues(udev_MDL, udev_serial_no, udev_back_end,remove_non_hp_config):
    status, output = utils.run('lpstat -v')

    same_printer_queues = []
    for p in output.splitlines():
        try:
            match = LPSTAT_PAT.search(p)
            printer_name = match.group(1)
            device_uri = match.group(2)
            if device_uri.startswith("cups-pdf:/"):
                  continue
            if not USB_PATTERN.search(device_uri):
                  continue

            back_end = BACK_END_PATTERN.search(device_uri).group(1)
            serial = USB_PATTERN.search(device_uri).group(1)
            log.debug("udev_serial_no[%s] serial[%s] udev_back_end[%s] back_end[%s]"%(udev_serial_no, serial, udev_back_end, back_end))
            if udev_serial_no == serial and (udev_back_end == back_end or back_end == 'usb'):
                if remove_non_hp_config and printer_name.find('_') == -1 and printer_name.find('-') != -1:
                    log.debug("Removed %s Queue"%printer_name)
                    # remove queues using cups API
                    cups.delPrinter(printer_name)
                else:
                    same_printer_queues.append(printer_name)

        except AttributeError:
            pass

    log.debug(same_printer_queues)
    return same_printer_queues

def check_cups_process():
    cups_running_sts = False
    sts, output = utils.run('lpstat -r')
    if sts == 0 and ('is running' in output):
        cups_running_sts = True

    return cups_running_sts

de...

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.