Bug 124217

Summary: UnboundLocalError during start of cups
Product: [Fedora] Fedora Reporter: Jochen Schmitt <jochen>
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: rawhideCC: carniz, dm, schape, w.antoine
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.6.100-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-01 16:28:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jochen Schmitt 2004-05-24 19:36:36 UTC
I have installed cups-1.1.20-8.

when I boot linux, I got the following error messages

cups starten: Traceback (most recent call last):
  File "/usr/sbin/printconf-backend", line 7, in ?
    import backend
  File "/usr/share/printconf/util/backend.py", line 54, in ?
    which = cups_import.which_spooler ()
  File "/usr/share/printconf/util/cups_import.py", line 195, in
which_spooler
    return which
UnboundLocalError: local variable 'which' referenced before assignment

Best Regards:

Jochen Schmitt

Comment 1 Tim Waugh 2004-05-24 21:01:06 UTC
What does '/usr/sbin/alternatives --display print' say?

Comment 2 Jochen Schmitt 2004-05-25 15:27:00 UTC
The prooblem seems, that you have to set LANG='C' before
/usr/sbin/alternatives should be called.

Becouse, I am living in germany, LANG will be not set to 'C' at 
default, so I get the german output from /usr/sbin/alternatives

Best Regards:

Jochen Schmitt

Comment 3 Tim Waugh 2004-05-26 08:17:34 UTC
Thanks.  Fixed in CVS.

Comment 4 Tim Waugh 2004-06-01 16:28:17 UTC
*** Bug 124940 has been marked as a duplicate of this bug. ***

Comment 5 Daniel Malmgren 2004-06-03 14:22:46 UTC
I don't get the bug when starting cups anymore. I still however get
almost the same error when starting system-config-printer (0.6.100-1):

Traceback (most recent call last):
  File "/usr/sbin/system-config-printer", line 9, in ?
    import queueTree
  File "/usr/share/printconf/util/queueTree.py", line 1235, in ?
    queueTree()
  File "/usr/share/printconf/util/queueTree.py", line 268, in __init__
    self.active_spooler = self.get_active_spooler ()
  File "/usr/share/printconf/util/queueTree.py", line 290, in
get_active_spooler
    return which
UnboundLocalError: local variable 'which' referenced before assignment

(damnit! Why isn't I allowed to reopen this bug?)

Comment 6 Tim Waugh 2004-06-03 15:21:39 UTC
Ah, there were other places that it gets invoked.  Fixed in 0.6.101-1.

Comment 7 Tim Waugh 2004-07-07 14:07:36 UTC
*** Bug 127368 has been marked as a duplicate of this bug. ***

Comment 8 Tim Waugh 2004-09-01 10:43:42 UTC
*** Bug 131380 has been marked as a duplicate of this bug. ***

Comment 10 Stéphane Chapeau 2004-11-19 15:58:56 UTC
This bug appear if you modify your /etc/sysconfig/i18n to disable 
UTF8 for example, and you set a lot of variable starting with LC_. 
  
You can fix the problem by using only 4 variable these for French for 
example of /etc/sysconfig/i18n without UTF8 by def 
 
SYSFONTACM=iso15 
LANG=fr_FR 
SUPPORTED="en_US.UTF-8:en_US:en:fr_FR.UTF-8:fr_FR:fr" 
SYSFONT=lat0-16