You are not logged in.

#1 2007-02-14 22:12:47

rochus
Member
Registered: 2007-02-14
Posts: 91

hplip not finding "cupsext"

Hello,

I encountered some problems using hplip lately. The setup did work, but since the last one or two updates to hplip, there was no need to print anything. Now, having the need to, i followed the following procedure (as always):

root# /etc/rc.d/hplip start
root# /etc/rc.d/cups start
rochus# hp-print myfile.pdf

the output was the following:

Traceback (most recent call last):
  File "/usr/bin/hp-print", line 133, in ?
    printdlg = PrinterForm(sock, bus, device_uri, printer_name, args)
  File "/usr/share/hplip/ui/printerform.py", line 195, in __init__
    self.cups_printers = cups.getPrinters()
  File "/usr/share/hplip/prnt/cups.py", line 99, in getPrinters
    return cupsext.getPrinters()
NameError: global name 'cupsext' is not defined

I searched google, but the only possible solution was provided at [1]. The problem is, there's no "cupsext" folder within /usr/share/hplip/prnt. Additionally, HPOJ is not running.

The same exception ("global name 'cupsext' is not defined") is thrown if I try to use hp-setup.

I reinstalled hplip and completely removed the *.pyc files in order to let python "recompile" them. Has anyone encountered this problem or has an idea on what to do?

thanks in advance,
rochus

[1] http://www.linuxquestions.org/questions … p?t=487997

Offline

#2 2007-02-17 00:24:59

Ser_Brend
Member
Registered: 2007-02-16
Posts: 2

Re: hplip not finding "cupsext"

HI! smile

I resolved this problem downloading the files: cupsext.c and setup.py

from -> http://lt.k1011.nutime.de/releases/Barb … t/cupsext/

then put in the same directory (new directory) an compile them:
# python setup.py build
From the compiling will be born 2 directory, you have to enter in cd /build/lib.linux-i686-2.4 and copy cupsext.so in to /usr/lib/python2.4
Then restart hplip daemon: /etc/rc.d/hplip restart

Verify with this command: hp-check

And you will see which kind of error you have.

Greetings from Italy cool

Last edited by Ser_Brend (2007-02-17 00:25:43)

Offline

#3 2007-02-17 00:29:00

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: hplip not finding "cupsext"

You're running python 2.5 from testing right? hplip currently only works with 2.4 as it hasn't been recompiled for python 2.5 yet.

Offline

#4 2007-02-17 06:17:48

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,323

Re: hplip not finding "cupsext"

rather the other way arround, hplip is accidently compiled against python 2.5

Offline

#5 2007-02-17 08:37:35

rochus
Member
Registered: 2007-02-14
Posts: 91

Re: hplip not finding "cupsext"

I'm running a python 2.4.4, so the problem might be that it is compiled against 2.5

@Ser_Brend: I'll give it a try as soon as I have time to. smile

Offline

#6 2007-02-24 00:46:11

stmok
Member
From: Sydney, Australia
Registered: 2006-11-19
Posts: 72

Re: hplip not finding "cupsext"

tpowa wrote:

rather the other way arround, hplip is accidently compiled against python 2.5

Correct.

Arch Linux hasn't updated to Python 2.5 for some reason. And HP is compiling hplip with Python 2.5 (confimred by the driver file list).

Ser_Brend has the current workaround...Which I just confirmed with my HP Color LaserJet 2550L and PSC2310.


The most important thing the hacker community does is write better code. Our deeds are the best propaganda we have. -Eric S. Raymond

Offline

#7 2007-02-25 06:09:29

ravster
Member
From: Queen's U, Kingston, Canada
Registered: 2004-05-02
Posts: 285
Website

Re: hplip not finding "cupsext"

Ser_brend,
  Awesome workaround, dude. wink:)
  Thanks,
Ravster

Offline

#8 2007-02-25 09:52:52

rochus
Member
Registered: 2007-02-14
Posts: 91

Re: hplip not finding "cupsext"

finally I got some spare time and it works!

Ser_Brend: Thank you and greetings from Germany smile

Offline

#9 2007-02-26 23:01:51

Ser_Brend
Member
Registered: 2007-02-16
Posts: 2

Re: hplip not finding "cupsext"

Sorry for my retard, I read now hmm
I'm running a python 2.4.4.

Ravster...Rochus Thanks! wink

Offline

Board footer

Powered by FluxBB