Cannot see Ricoh Aficio MPC 3000 driver in New printer dialog

Bug #299074 reported by mabawsa
2
Affects Status Importance Assigned to Milestone
system-config-printer (Debian)
Fix Released
Unknown
system-config-printer (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I upgraded from hardy (where everything worked well) to Intrepid. However our printer started to lock constantly. I then decided to run a fresh install of intrepid. Now I cannot select the printer driver on the install printer wizard. My other machines still crash the printer maybe this is related?
Everything is at the latest version.
Linux tomato 2.6.27-8-generic #1 SMP Thu Nov 6 17:33:54 UTC 2008 i686 GNU/Linux

fyi I attach a screenshot and the output from the command:
~$ system-config-printer
/usr/share/system-config-printer/system-config-printer.py:197: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.xml = gtk.glade.XML(xml, domain = domain)
No ID match for device socket://172.31.0.200:9100:
  <manufacturer>AppSocket/HP</manufacturer>
  <model>JetDirect</model>
  <description>AppSocket/HP JetDirect</description>
  <commandset></commandset>
Using lsb/usr/cups-included/textonly.ppd
Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 4884, in on_tvNPModels_cursor_changed
    self.fillDriverList(self.NPMake, pmodel)
  File "/usr/share/system-config-printer/system-config-printer.py", line 4847, in fillDriverList
    self.jockey_installed_files)
  File "/var/lib/python-support/python2.5/cupshelpers/ppds.py", line 435, in orderPPDNamesByPreference
    ppdnamelist.sort (sort_ppdnames)
  File "/var/lib/python-support/python2.5/cupshelpers/ppds.py", line 413, in sort_ppdnames
    ca = is_C_locale (a)
  File "/var/lib/python-support/python2.5/cupshelpers/ppds.py", line 399, in is_C_locale
    elif x[i - 1] not in string.letters:
UnicodeDecodeError: 'utf8' codec can't decode byte 0xaa in position 52: unexpected code byte

Revision history for this message
mabawsa (mabawsa) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

There is at least a problem in system-config-printer, as system-config-printer crashes. In addition it is possible that your printer got crashed by another machine and so it is not possible to communicate with it.

The system-config-printer crash seems to have to do with internationalization. Try

LC_ALL=C system-config-printer

on the command line to see whether then no crash happens.

Changed in foomatic-db:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
mabawsa (mabawsa) wrote :

Thanks for the rapid response Till.
The LC_ALL=C prefix meant I can list and install the printer now.
I have four machines all on intrepid now that crash the printer on a random basis (mostly with spreadsheet and webpages) that worked for months on gutsy and hardy. For sure we have lost duplexing since the upgrade. I wanted to test a clean install and figure out how to give a useful output on this before filing this as a bug.

Cheers

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

We will keep this bug report for the traceback of system-config-printers. For the Duplex issue a separate bug got reported. It is bug 219999.

For the random crashes open a new bug report.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Tim, can you have a look at the I18n problem in system-config-printer here? It seems that in a non-English environment the New Printer wizard crashes.

Revision history for this message
mabawsa (mabawsa) wrote : Re: [Bug 299074] Re: Cannot see Ricoh Aficio MPC 3000 driver in New printer dialog

Thanks Till I have been looking at 219999 but I thought a fix had been
released?

Also the printer is in a very English environment :-) :

$locale

LANG=en_GB
LANGUAGE=en_GB:en
LC_CTYPE="en_GB"
LC_NUMERIC="en_GB"
LC_TIME="en_GB"
LC_COLLATE="en_GB"
LC_MONETARY="en_GB"
LC_MESSAGES="en_GB"
LC_PAPER="en_GB"
LC_NAME="en_GB"
LC_ADDRESS="en_GB"
LC_TELEPHONE="en_GB"
LC_MEASUREMENT="en_GB"
LC_IDENTIFICATION="en_GB"
LC_ALL=

Till Kamppeter wrote:

> Tim, can you have a look at the I18n problem in system-config-printer
> here? It seems that in a non-English environment the New Printer wizard
> crashes.
>
>

Revision history for this message
Tim Waugh (twaugh) wrote :

Till, this problem is due to the Jockey changes. Please investigate. Thanks.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Tim, the program breaks in the is_C_locale() function which you must have written. The name suggests that this function determines whether a PPD is of C locale.

Problem for me is that PPDs cannot really be of C locale. They have a language and if the default locale of the system cannot be determined the English PPDs should be preferred. English PPDs usually cannot be determined by the file name. One finds them by the "*LanguageVersion: English" line.

Another problem is what is_C_locale() actually does. It searches in an awkward way for a "C" as an isolated word in the file name. Once this can be done with the regexp "\bC\b" in one line, and second, PPD file names do not contain an isolated "C" to tell that they are of C locale, at least not by any standard. This makes only sense with the PPDs of Gutenprint in the times when they did not get auto-generated, as the English ones were in a "C" subdirectory. Was this the intention of the is_C_locale() function? Now the function does not make sense at all any more, as Gutenprint PPDs have URIs like "gutenprint.5.2://xerox-wc_m118/expert". Also the ready-made PPDs of the OpenPrinting packages of Gutenprint do not have a "C" in their paths.

The actual crash happens because one of the PPD file names fed into the function contains an unknown character code. As PPDs come from many sources, not only from the distro's own packages, or the PPD repository directory can even be corrupted, system-config-printer should handle broken PPD names gracefully, with "try:" statements, by cleaning the names, ...

I will not try to fix the is_C_locale() as it is subject to be removed in future versions of system-config-printer due to not making much sense.

I have installed the openprinting-ppds-extra package from Ubuntu and also the openprinting-ppds-postscript-ricoh and the openprinting-ppds-pxlcolor-ricoh packages from OpenPrinting, to have all possible PPDs for the Ricoh Aficio MP C3000. I can set up this printer with system-config-printer without getting a crash on is_C_locale(). So on your system there must be a PPD for the Ricoh Aficio MP C3000 where the file name is corrupted.

If during your first attemt to set up your printer with system-config-printer Jockey (driver download manager) was started and you have agreed to install a driver package for your printer, then one of the packages openprinting-ppds-postscript-ricoh or openprinting-ppds-pxlcolor-ricoh got installed, but my tests show that the PPD file names in these packages are OK.

Can you post the output of

dpkg -l | grep -i openprinting

Revision history for this message
mabawsa (mabawsa) wrote :

Please find my:
dpkg -l | grep -i openprinting > openprinting.log

Revision history for this message
Tim Waugh (twaugh) wrote :

Yes, it is for gutenprint 5.0 PPDs. Actually I'd thought it was part of the ppd-natural-language filter, but that is elsewhere.

I'll add a try..except around it for the time being, as gutenprint 5.2 is not shipped everywhere yet.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

mabawsa, thanks. These packages I have also installed and the file names in them are OK. When you list all available PPDs with "lpinfo -m", are there any file names with strange characters?

Revision history for this message
mabawsa (mabawsa) wrote :

I had a good look at this list but couldn't really see anything strange, but It is very long. I also checked some other printers and they also caused the error. All the printers I have looked at so far come from the openprinting-ppd.deb.

Changed in system-config-printer:
status: Incomplete → New
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Fix came in with one of the recent upstream updates. As Tim told, the offending line is between "try: ... except: ..." now.

Changed in system-config-printer (Ubuntu):
status: New → Fix Released
Changed in system-config-printer (Debian):
status: Unknown → Confirmed
Changed in system-config-printer (Debian):
status: Confirmed → 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.