Public bug reported:

* I have gone through `do-release-upgrade` and the system has upgraded 
successfully.
* I have rolled back the graphic drivers to nouveau to have a clean drivers 
installation

Once I tried to run `$ sudo ubuntu-drivers autoinstall` to install graphics 
drivers, this exception was raised:
```
Traceback (most recent call last):
  File "/usr/bin/ubuntu-drivers", line 513, in <module>
    greet()
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 84, in 
new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/bin/ubuntu-drivers", line 432, in autoinstall
    command_install(config)
  File "/usr/bin/ubuntu-drivers", line 187, in command_install
    UbuntuDrivers.detect.nvidia_desktop_pre_installation_hook(to_install)
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 839, in 
nvidia_desktop_pre_installation_hook
    with_nvidia_kms = version >= 470
UnboundLocalError: local variable 'version' referenced before assignment
```

It looks like `version` is an unitialized variable, Cheers.

** Affects: gnome-shell (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-shell in Ubuntu.
https://bugs.launchpad.net/bugs/1998853

Title:
  ubuntu-drivers autoinstall --- UnboundLocalError

Status in gnome-shell package in Ubuntu:
  New

Bug description:
  * I have gone through `do-release-upgrade` and the system has upgraded 
successfully.
  * I have rolled back the graphic drivers to nouveau to have a clean drivers 
installation

  Once I tried to run `$ sudo ubuntu-drivers autoinstall` to install graphics 
drivers, this exception was raised:
  ```
  Traceback (most recent call last):
    File "/usr/bin/ubuntu-drivers", line 513, in <module>
      greet()
    File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
      return self.main(*args, **kwargs)
    File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
      rv = self.invoke(ctx)
    File "/usr/lib/python3/dist-packages/click/core.py", line 1659, in invoke
      return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
      return ctx.invoke(self.callback, **ctx.params)
    File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
      return __callback(*args, **kwargs)
    File "/usr/lib/python3/dist-packages/click/decorators.py", line 84, in 
new_func
      return ctx.invoke(f, obj, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
      return __callback(*args, **kwargs)
    File "/usr/bin/ubuntu-drivers", line 432, in autoinstall
      command_install(config)
    File "/usr/bin/ubuntu-drivers", line 187, in command_install
      UbuntuDrivers.detect.nvidia_desktop_pre_installation_hook(to_install)
    File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 839, in 
nvidia_desktop_pre_installation_hook
      with_nvidia_kms = version >= 470
  UnboundLocalError: local variable 'version' referenced before assignment
  ```

  It looks like `version` is an unitialized variable, Cheers.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1998853/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to