Bug 482915 - driconf doesn't run; there is a python error
driconf doesn't run; there is a python error
Product: Fedora
Classification: Fedora
Component: driconf (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Kevin Fenzi
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-01-28 14:39 EST by Aram Agajanian
Modified: 2009-05-11 02:22 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-05-11 02:22:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Gentoo 166151 None None None Never

  None (edit)
Description Aram Agajanian 2009-01-28 14:39:45 EST
Description of problem:
When I run driconf from the command line, the window never appears.  Instead, a python error message is generated.

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

How reproducible:
Happens every time that I run driconf.

Steps to Reproduce:
1. run driconf from the command line
Actual results:
No configuration window appears.  The following error message appears in the terminal where the driconf command was entered:

Traceback (most recent call last):
  File "/usr/bin/driconf", line 28, in <module>
  File "/usr/lib/python2.5/site-packages/driconf.py", line 142, in main
  File "/usr/lib/python2.5/site-packages/driconf_simpleui.py", line 871, in start
    mainWindow = MainWindow(configList)
  File "/usr/lib/python2.5/site-packages/driconf_simpleui.py", line 522, in __init__
  File "/usr/lib/python2.5/site-packages/driconf_simpleui.py", line 607, in selectScreen
  File "/usr/lib/python2.5/site-packages/driconf_simpleui.py", line 643, in selectApp
    self.appPage = AppPage (self.driver, app)
  File "/usr/lib/python2.5/site-packages/driconf_simpleui.py", line 347, in __init__
  File "/usr/lib/python2.5/site-packages/driconf_simpleui.py", line 370, in refreshOptions
    lineWrap(opt.getDesc([lang]).text), sectI, optI])
  File "/usr/lib/python2.5/site-packages/driconf_simpleui.py", line 271, in lineWrap
    head, tail = head + tail[:i] + '\n', tail[j:]
UnboundLocalError: local variable 'j' referenced before assignment

Expected results:

A window should appear that configures the DRI.

Additional info:

When I first installed driconf, the window would appear when I run it from the GNOME menu.  I'm not sure what happened that stopped it from running.
Comment 1 Kevin Fenzi 2009-01-29 17:19:30 EST
I can't seem to duplcate this here. ;( 

Is there any output from 'rpm -V driconf' ?

Can you pinpoint when it started failing? Is there anything that happened around that time? some update? changes you made?
Comment 2 Aram Agajanian 2009-01-29 23:36:22 EST
Unfortunately, I'm not sure what happened when started it to fail.

I ran 'rpm -V driconf' command and it generated no output.

However, if I insert the line "j=i" at line 260 of 
/usr/lib/python2.5/site-packages/driconf_simpleui.py, the GUI comes up.  (This patch was mentioned in the referenced Gentoo bug report.)

Looking at the code, I think I understand why there is an error.  The variable j is evaluated before it may have been assigned to (depending on the flow of control).
Comment 3 Aram Agajanian 2009-01-30 23:01:12 EST
OK, I believe that I have a repeatable procedure to generate the bug.

1) Delete ~/.drirc (or rename it to something else).

2) Run driconf.  A pop-up will appear which informs the user that a new DRI Configuration file has been created.

3) Click on the triangle next to the text "Application Settings".  This causes the area section of the driconf window to grow.  There is an Add button and some other greyed out controls.

4) Click on the Add button.  An Add Application pop-up appears.

5) Enter the name and executable of a GL application and then click OK.

At this point, you see the following error in the Terminal if you started driconf from a command line:

UnboundLocalError: local variable 'j' referenced before assignment

6) Click on the Close button.  The driconf window disappears and the program terminates.

7) Try to run driconf again from the command line.  The window never appears and the program terminates with the same error message.
Comment 4 Kevin Fenzi 2009-02-03 17:09:18 EST
Yeah, looks like... It's odd that it never showed up here before. 

Anyhow, can you try this build: 


Does it solve the issue for you?
Comment 5 Aram Agajanian 2009-02-06 22:46:59 EST
Yes, this build fixes the problem.  I no longer get any python errors when running driconf.
Comment 6 Kevin Fenzi 2009-02-09 21:07:08 EST
I'be pushed out an update for F10 for this. It should push out on the next push. 
Thanks for this bug!
Comment 7 Kevin Fenzi 2009-05-11 02:22:25 EDT
This should be all done. Closing now. 

Thanks again for the bug report.

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