Bug 57986 - SystemError: error return without exception set
SystemError: error return without exception set
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: alchemist (Show other bugs)
1.0
i386 Linux
high Severity high
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-04 08:48 EST by Mario Mikocevic
Modified: 2005-10-31 17:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-10 08:46:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mario Mikocevic 2002-01-04 08:48:32 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7+) Gecko/20020103

Description of problem:
Printer is Lexmark Optra SC 1275 :

trying to setup it in Setup -> Printer config results in -->

# printconf-tui
Initializing alchemist edit environment ...
Initializing linux printing database ...
Traceback (most recent call last):
  File "/usr/sbin/printconf-tui", line 8, in ?
    printconf_tui.startup_and_find_cmd()
  File "/usr/share/printconf/util/printconf_tui.py", line 2174, in
startup_and_find_cmd
    main.cmd_handlers[cmd]()
  File "/usr/share/printconf/util/printconf_tui.py", line 2053, in tui_main_run
    qld_run()
  File "/usr/share/printconf/util/printconf_tui.py", line 1926, in qld_run
    if nqd_run():
  File "/usr/share/printconf/util/printconf_tui.py", line 153, in nqd_run
    nqd_finish()
  File "/usr/share/printconf/util/printconf_tui.py", line 259, in nqd_finish
    construct_queue(nqd.queue_type_space, nqd.data, nqd.driver_tuple)
  File "/usr/share/printconf/util/printconf_conf.py", line 788, in
construct_queue
    filter_data["printer_id"] = printer.id
SystemError: error return without exception set

# rpm -qf /usr/sbin/printconf-tui
printconf-0.3.52-1



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.printconf-tui
2.Choose :
  Type: Jetdirect Printer
    IP: xx.xx.xx.xx
  Port: 9100
Driver: Lexmark Optra Color 1275 Postscript

3. *BOOM*
	

Actual Results:  # printconf-tui
Initializing alchemist edit environment ...
Initializing linux printing database ...
Traceback (most recent call last):
  File "/usr/sbin/printconf-tui", line 8, in ?
    printconf_tui.startup_and_find_cmd()
  File "/usr/share/printconf/util/printconf_tui.py", line 2174, in
startup_and_find_cmd
    main.cmd_handlers[cmd]()
  File "/usr/share/printconf/util/printconf_tui.py", line 2053, in tui_main_run
    qld_run()
  File "/usr/share/printconf/util/printconf_tui.py", line 1926, in qld_run
    if nqd_run():
  File "/usr/share/printconf/util/printconf_tui.py", line 153, in nqd_run
    nqd_finish()
  File "/usr/share/printconf/util/printconf_tui.py", line 259, in nqd_finish
    construct_queue(nqd.queue_type_space, nqd.data, nqd.driver_tuple)
  File "/usr/share/printconf/util/printconf_conf.py", line 788, in
construct_queue
    filter_data["printer_id"] = printer.id
SystemError: error return without exception set


Expected Results:  Proper /etc/printcap done !:)

Additional info:
Comment 1 Olivier Baudron 2002-01-13 09:49:13 EST
I have exactly the same error message with a parallel port printer (epson stylus
color 800). Now, on my rawhide linux box, I got to the point where princonf-gui
crashes (bug 57515) and printconf-tui crashes... How am I supposed to configure
the printer??
Comment 2 Tim Waugh 2002-01-25 10:27:05 EST
Does the printconf currently in rawhide help any?
Comment 3 Olivier Baudron 2002-01-27 06:04:08 EST
The following upgrades fixed the problem for printconf-tui:

perl-5.6.1-21
perl-XML-Parser-2.30-10

whatever the printconf version be (0.3.58-1 and 0.3.62-1).
Comment 4 Tim Waugh 2002-01-27 12:07:07 EST
Okay, thanks.
Comment 5 Mario Mikocevic 2002-01-28 05:09:19 EST
Umh, NO BANNANAS !

# date
Mon Jan 28 11:02:34 CET 2002

# setup
Initializing alchemist edit environment ...
Initializing linux printing database ...
Traceback (most recent call last):
  File "/usr/sbin/printconf-tui", line 8, in ?
    printconf_tui.startup_and_find_cmd()
  File "/usr/share/printconf/util/printconf_tui.py", line 2059, in
startup_and_find_cmd
    main.cmd_handlers[cmd]()
  File "/usr/share/printconf/util/printconf_tui.py", line 1938, in tui_main_run
    qld_run()
  File "/usr/share/printconf/util/printconf_tui.py", line 1811, in qld_run
    if nqd_run():
  File "/usr/share/printconf/util/printconf_tui.py", line 153, in nqd_run
    nqd_finish()
  File "/usr/share/printconf/util/printconf_tui.py", line 260, in nqd_finish
    construct_queue(nqd.queue_type_space, nqd.data, nqd.driver_tuple)
  File "/usr/share/printconf/util/printconf_conf.py", line 815, in construct_queue
    filter_data["printer_id"] = printer.id
SystemError: error return without exception set

It's _the_ _latest_ rawhide mirror !

# rpm -qa | grep print
gnome-print-0.34.90-1
printconf-gui-0.3.62-1
printconf-0.3.62-1
libgnomeprint15-0.34.90-1

# rpm -qa | grep perl 
groff-perl-1.17.2-9
perl-libxml-enno-1.02-8
perl-5.6.1-22
perl-XML-Encoding-1.01-4
perl-DateManip-5.40-10
perl-HTML-Parser-3.25-5
perl-URI-1.17-10
perl-CGI-2.752-22
perl-XML-Parser-2.30-10
perl-XML-Dumper-0.4-7
perl-CPAN-1.59_54-22
perl-DB_File-1.75-22
perl-MIME-Base64-2.12-9
perl-Storable-1.0.14-10
perl-libxml-perl-0.07-9
perl-XML-Grove-0.46alpha-6
perl-HTML-Tagset-3.03-9
perl-SGMLSpm-1.03ii-5
perl-libwww-perl-5.62-9
perl-XML-Twig-2.02-4
perl-Digest-MD5-2.16-10
perl-Parse-Yapp-1.05-10

# rpm -qa | grep Py  
PyXML-0.7-3

Printer setup is HP4050TN as jetdirect with postscript driver.
If I _copy_ /etc/printcap from RH7.2 install (same printer data)
LPRng works just fine.

So _what_ to do next ?
Comment 6 Tim Waugh 2002-01-28 05:17:21 EST
Alright.  Please tell me exactly what buttons you press, and in which order.

Thanks.
Comment 7 Mario Mikocevic 2002-01-28 05:33:39 EST
Ok, here it goes ->

# setup    (printconf-tui does the same)

Printer configuration

New

Queue Name:hp
Jetdirect Printer                   JETDIRECT
Next

Ip    195.29.xxx.xxx
Port  9100
Next

<-> HP
   <-> Color LaserJet 4550
          Postscript
Next


 About to create the following queue:
xx                     Type: Jetdirect Printer
xx                       IP: 195.29.xxx.xxx
xx                     Port: 9100
xx                   Driver: HP Color LaserJet 4550 Postscript                   

Finish
**KABOOM**

The _same_ happens with Lexmark Optra Color 1275 Postscript
as driver.

Comment 8 Tim Waugh 2002-01-28 06:21:06 EST
What does 'rpm -qV foomatic' say?


Comment 9 Mario Mikocevic 2002-01-28 06:30:23 EST
# rpm -qV foomatic
foomatic-1.1-1.20011018.7

Oh, nooo, just noticed that dreaded rpm bug again (-1.$DATE vs -0.$DATE).
Argh, upgrading with --force ..

# rpm -Uvh --force foomatic-1.1-0.20020124.2.i386.rpm 
Preparing...                ########################################### [100%]
   1:foomatic               ########################################### [100%]

# rpm -qV foomatic                                   
foomatic-1.1-0.20020124.2

testing printer setup again ..
argh, even worse ->

# printconf-tui 
Initializing alchemist edit environment ...
Initializing linux printing database ...
sh: /var/cache/foomatic/compiled/overview.xml: No such file or directory
cat: /var/cache/foomatic/compiled/overview.xml: No such file or directory
Traceback (most recent call last):
  File "/usr/sbin/printconf-tui", line 8, in ?
    printconf_tui.startup_and_find_cmd()
  File "/usr/share/printconf/util/printconf_tui.py", line 2059, in
startup_and_find_cmd
    main.cmd_handlers[cmd]()
  File "/usr/share/printconf/util/printconf_tui.py", line 1927, in tui_main_run
    foomatic_init_overview()
  File "/usr/share/printconf/util/printconf_conf.py", line 1281, in
foomatic_init_overview
    root = parser.parse(foo.fromchild)
  File
"/usr/src/build/65732-i386/install/usr/lib/python2.2/site-packages/_xmlplus/utils/qp_xml.py",
line 134, in parse
xml.parsers.expat.ExpatError: no element found: line 1, column 0

Comment 10 Tim Waugh 2002-01-28 06:37:54 EST
Do you have a /var/cache/foomatic/compiled directory?  If not, make one.
Comment 11 Mario Mikocevic 2002-01-28 06:44:14 EST
Nope, here it goes ->

# l /var/cache/foomatic 
total 8
drwxr-xr-x    2 root     root         4096 Sij 26 18:01 .
drwxr-xr-x    7 root     root         4096 Sij 23 14:10 ..
# mkdir /var/cache/foomatic/compiled
# printconf-tui
Initializing alchemist edit environment ...
Initializing linux printing database ...
Traceback (most recent call last):
  File "/usr/sbin/printconf-tui", line 8, in ?
    printconf_tui.startup_and_find_cmd()
  File "/usr/share/printconf/util/printconf_tui.py", line 2059, in
startup_and_find_cmd
    main.cmd_handlers[cmd]()
  File "/usr/share/printconf/util/printconf_tui.py", line 1938, in tui_main_run
    qld_run()
  File "/usr/share/printconf/util/printconf_tui.py", line 1811, in qld_run
    if nqd_run():
  File "/usr/share/printconf/util/printconf_tui.py", line 153, in nqd_run
    nqd_finish()
  File "/usr/share/printconf/util/printconf_tui.py", line 260, in nqd_finish
    construct_queue(nqd.queue_type_space, nqd.data, nqd.driver_tuple)
  File "/usr/share/printconf/util/printconf_conf.py", line 815, in construct_queue
    filter_data["printer_id"] = printer.id
SystemError: error return without exception set


hum, I'm doomed ..
Comment 12 Tim Waugh 2002-01-28 06:56:34 EST
Run 'printconf-backend --force-rebuild'.
Comment 13 Mario Mikocevic 2002-01-28 07:18:17 EST
Still no go ->

# printconf-backend --force-rebuild
# printconf-tui                    
Initializing alchemist edit environment ...
Initializing linux printing database ...
Traceback (most recent call last):
  File "/usr/sbin/printconf-tui", line 8, in ?
    printconf_tui.startup_and_find_cmd()
  File "/usr/share/printconf/util/printconf_tui.py", line 2059, in
startup_and_find_cmd
    main.cmd_handlers[cmd]()
  File "/usr/share/printconf/util/printconf_tui.py", line 1938, in tui_main_run
    qld_run()
  File "/usr/share/printconf/util/printconf_tui.py", line 1811, in qld_run
    if nqd_run():
  File "/usr/share/printconf/util/printconf_tui.py", line 153, in nqd_run
    nqd_finish()
  File "/usr/share/printconf/util/printconf_tui.py", line 260, in nqd_finish
    construct_queue(nqd.queue_type_space, nqd.data, nqd.driver_tuple)
  File "/usr/share/printconf/util/printconf_conf.py", line 815, in construct_queue
    filter_data["printer_id"] = printer.id
SystemError: error return without exception set

Comment 14 Tim Waugh 2002-01-29 04:42:49 EST
Possibly a python2.2 thing.  I'll look at it again when anaconda can build rawhide
installations.
Comment 15 Tim Waugh 2002-01-29 07:23:55 EST
Oh, wait, I see what it is.  Alchemist doesn't handle python unicode types.
Comment 16 Tim Waugh 2002-01-29 07:25:19 EST
Test case:

# cd /usr/share/printconf/util
# python
>>> from printconf_conf import *
>>> editor = SubspaceEditor("printconf")
>>> dict = editor.editReadBox("local")
>>> ctx = dict["dynamic_context"]
>>> queue = ctx.data["/printconf/print_queues"].addData(AdmListType, "queuename")
>>> queue.atomic = 1
>>> filter_data = queue.addData(AdmListType, "filter_data")
>>> filter_data["printer_id"] = u"1"

Comment 17 Mario Mikocevic 2002-01-29 07:29:25 EST
# cd /usr/share/printconf/util
# python
Python 2.2 (#1, Jan 25 2002, 13:13:10) 
[GCC 3.1 20020115 (Red Hat Linux Rawhide 3.1-0.18)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from printconf_conf import *
>>> editor = SubspaceEditor("printconf")
>>> dict = editor.editReadBox("local")
>>> ctx = dict["dynamic_context"]
>>> queue = ctx.data["/printconf/print_queues"].addData(AdmListType, "queuename")
>>> queue.atomic = 1
>>> filter_data = queue.addData(AdmListType, "filter_data")
>>> filter_data["printer_id"] = u"1"
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
SystemError: error return without exception set
>>> 
Comment 18 Crutcher Dunnavant 2002-02-11 01:52:43 EST
There are 2 problems here.

1: in alchemist/src/pyalchemist.c
pyAdmList_mp_setitem needs to set error codes properly before returning -1 on
all errors.

2: in general, and in the same function:
The alchemist does not use the PyUnicode class anywhere, at all. This is not my
bug, really, as the class did not exist in python 1. However, every place where
a PyString is checked for and used in the pyalchemist code, there needs to be
parallel code to check for PyUnicode as well. This will not be fun.
Comment 19 Tim Waugh 2004-12-10 08:46:22 EST
This is worked around in printconf now.

Note You need to log in before you can comment on or make changes to this bug.