Description of problem: When adding a local printer on lpt port, and opting to provide own ppd file system-config-printer throws an irrelevant and incorrect error. Version-Release number of selected component (if applicable): system-config-printer 0.7.40 (current fc6?) How reproducible: Every time Steps to Reproduce: 1. run system-config-printer via system/administration/printing (enter root passwd) 2. pick new printer 3. pick forward 4. pick lpt port 5. pick provide PPD file and navigate to ppd and select it 6. hit forward 7. hit apply 8. observe strange "database error" error message Actual results: database error about generic driver (not relevant to ppd) Expected results: accepted ppd and working printer :) Additional info: See http://www.symons.net.au/system-config-printer/ for screen shots, as well as this ppd file for brother hl-2040 printer (which is not otherwise listed, although it seems to work when configured as a brother 2400CeN Foomatic/hl1250)
Thanks for the detailed bug report. There are several things going on here: 1. The error message should say 'There is a problem with the PPD file', and show the output of 'cupstestppd' on the PPD file, because that's what has triggered this error. 2. The libcups routine for parsing PPD files should perhaps be more lenient in what it accepts. 3. The PPD file in question has lots of things wrong with it!
Please try 0.7.43-1.fc6 from updates-testing: yum --enablerepo=updates-testing update 'system-config-printer*' You should get a better error message.
Ok. I tried something slightly different first since its christmas holidays and Im at home while this printer is on my workstation at work. This is what I did: 1. run system-config-printer, couldnt do anything. Start cups service and set it to auto run on reboot, ran system-config-printer again 2. hit "new printer" 3. hit forward 4. pick ipp protocol ip=10.0.3.3 (workstation at work, via vpn sharing this printer with ipp and samba) printername=printer then forward 5. pick provide ppd, pick this same ppd file 6. "going to create new printer printer at ipp://10.0.3.3/printers/printeer" click apply 7. nothing happens? 8. error observed in terminal where system-config-printer was run: Traceback (most recent call last): File "/usr/share/system-config-printer/system-config-printer.py", line 2490, in on_btnNPApply_clicked ppd = get_PPD_but_handle_errors () File "/usr/share/system-config-printer/system-config-printer.py", line 2460, in get_PPD_but_handle_errors err = _('Failed to read PPD file. Possible reason ' TypeError: not all arguments converted during string formatting 9. retest configuring on lpt1:, same lack of error in gui, and same trace info in terminal.
Back at work, tried this again on FC6 workstaion here. Got this PPD error: PPD error Failed to read PPD file. Possible reason follows: /home/ant/BH2040.PPD: FAIL **FAIL** Unable to open PPD file - Missing PPD-Adobe-4.x header on line 1. REF: Page 42, section 5.2. WARN File contains a mix of CR, LF, and CR LF line endings! WARN Non-Windows PPD files should use lines ending with only LF, not CR LF! Looks like a more appropriate error than originally found. I added a header to line 1: *PPD-Adobe: "4.3" Then removed the lines that had been commented out with % (should it just skip these?) Then loaded the PPD. It was accepted and the printer is listed. Then when I click on the printer name of this printer, system-config-printer crashes out with a segfault! [root@ant ~]# system-config-printer Segmentation fault [root@ant ~]# Should I file this under a seperate bug?
The PPD ive patched, which is accepted, but which causes system-config-printer to segfault can be downloaded here: http://www.symons.net.au/system-config-printer/patchedppd/BH2040.PPD Other possibly relevant info that may help with reproducability is that I have this printer configured twice, both times on the same port. The first works fine, the second (named printertest) causes the segfault. This configureation may be relevant more than the ppd itself. If this bug is not reproducable I can dig more deeply.
The segfault was in the pycups library provided by system-config-printer. I've fixed this in system-config-printer-0.7.45-1.fc6, which will be available shortly in updates-testing. Thanks for reporting it!
0.7.45-1.fc6 should be available now: yum --enablerepo=updates-testing update 'system-config-printer*'
yes, this has fixed the crash! However now whenever i click off the printer to another printer, I get asked to apply the changes (without making any changes). I say apply, then click back on and off the new printer again, and get asked to apply changes every time...
This is because it's a bad PPD file. Try playing around with cupstestppd and you'll find lots and lots of problems with it. For example, none of the options use OpenUI/CloseUI, and so none of them are typed properly. There are at least ten missing required attributes. It uses illegal control characters for more or less every single option choice string. I would recommend that you use a better PPD file. Perhaps the one linked from this page?: http://openprinting.org/show_printer.cgi?recnum=Brother-HL-2040
Fixed in update: system-config-printer-0.7.45-1.fc6