[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-06-12 Thread Launchpad Bug Tracker
This bug was fixed in the package ubuntu-drivers-common -
1:0.9.6.2~0.22.04.3

---
ubuntu-drivers-common (1:0.9.6.2~0.22.04.3) jammy; urgency=medium

  * UbuntuDrivers/detect.py:
- Fix "882:5 local variable 'with_nvidia_kms' is assigned to
  but never used" FTBFS (triggered by tests/test_static.py).

ubuntu-drivers-common (1:0.9.6.2~0.22.04.2) jammy; urgency=medium

  [ Alberto Milone ]
  * debian/rules:
- Limit the tests to the selected architectures (amd64, arm64).
  This prevents armhf builds from failing.
  * UbuntuDrivers/detect.py:
- Make sure all -open drivers have a lower priority, regardless
  of whether the --server parameter is passed in or not.
- Update regex and unify package name parsing in the following
  functions by using the new NvidiaPkgNameInfo class:
  nvidia_desktop_pre_installation_hook,
  _get_headless_no_dkms_metapackage,
  nvidia_desktop_pre_installation_hook,
  get_linux_modules_metapackage,
  This prevents ubuntu-drivers from crashing when dealing with
  the -open NVIDIA drivers (LP: #1993019).
  * tests/test_ubuntu_drivers.py:
- Add tests so we make sure to keep preferring non-open NVIDIA
  modules over the -open ones, at least until the open modules catch up
  feature wise and performance wise.

  [ gongzhengyang ]
  * UbuntuDrivers/detect.py:
- Fix local variable 'version' being referenced before assignment
  when catching ValueError (LP: #1993019).

  [ Jeff Lane ]
  * detect-plugins/sl-modem.py:
- Add some error trapping when aplay is not installed (on servers)
  (LP: #1935070).

 -- Alberto Milone   Wed, 08 Mar 2023
16:03:28 +

** Changed in: ubuntu-drivers-common (Ubuntu Jammy)
   Status: Fix Committed => Fix Released

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  Triaged
Status in ubuntu-drivers-common source package in Focal:
  Triaged
Status in ubuntu-drivers-common source package in Jammy:
  Fix Released
Status in ubuntu-drivers-common source package in Kinetic:
  Fix Released

Bug description:
  [ Impact ]

   * The introduction of the -open NVIDIA drivers requires a change in
  the way we detect driver series and flavours. Failing to do so, causes
  the ubuntu-drivers tool to crash (LP: #1993019), or to prefer the
  -open drivers over the non-open ones (LP: #1988836).

   * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
  package is not installed (mainly on servers), ubuntu-drivers (through
  the sl-modem plugin) complains, unnecessarily about the missing aplay
  binary.

  [ Test Plan ]

   * Install the new ubuntu-drivers-common from -proposed on a system
  where the GPU is compatible with the 515 series (or higher).

   * Run the ubuntu-drivers list command, and make sure that the 515
  driver series (or higher) is listed.

   * Try installing the driver using the following command:
 sudo ubuntu-drivers install

   * Check which driver series was installed (you can use the "sudo
  ubuntu-drivers debug" command), and make sure that the installation
  does not cause ubuntu-drivers to crash.

  [ Where problems could occur ]

   * A problem in the ubuntu-drivers tool can cause it to install a driver which
 is not recommended for the detected hardware, or even cause the package
 installation to fail, and prevent users from logging in through the
 graphics interface.

  
  [ Other Info ]
   
   * To prevent failures of the test-suite on architectures such as armhf (as 
seen
 in Lunar), we are skipping the tests for any architectures other than amd64
 and arm64 (which are the only ones actually using ubuntu-drivers).
 This was already the case with riscv, and we now have an easier way
 to do so in the debian/rules file.

  
  == Changelogs ==

  === Kinetic and Jammy ===

[ Alberto Milone ]
* New upstream release:
* UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
of whether the --server parameter is passed in or not.
  - Update regex in nvidia_desktop_pre_installation_hook. This prevents
ubuntu-drivers from crashing when dealing with the -open NVIDIA
drivers (LP: #1993019).
* tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
modules over the -open ones, at least until the open modules catch up
feature wise and performance wise.

[ gongzhengyang ]
* UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
when catching ValueError (LP: #1993019).

[ Jeff Lane ]

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-06-12 Thread Dirk Su
All related bugs https://bugs.launchpad.net/bugs/1988836 and
https://bugs.launchpad.net/bugs/1935070 had been verified in Jammy. Can
0.9.6.2~0.22.04.3 be released to jammy-updates?

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  Triaged
Status in ubuntu-drivers-common source package in Focal:
  Triaged
Status in ubuntu-drivers-common source package in Jammy:
  Fix Committed
Status in ubuntu-drivers-common source package in Kinetic:
  Fix Released

Bug description:
  [ Impact ]

   * The introduction of the -open NVIDIA drivers requires a change in
  the way we detect driver series and flavours. Failing to do so, causes
  the ubuntu-drivers tool to crash (LP: #1993019), or to prefer the
  -open drivers over the non-open ones (LP: #1988836).

   * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
  package is not installed (mainly on servers), ubuntu-drivers (through
  the sl-modem plugin) complains, unnecessarily about the missing aplay
  binary.

  [ Test Plan ]

   * Install the new ubuntu-drivers-common from -proposed on a system
  where the GPU is compatible with the 515 series (or higher).

   * Run the ubuntu-drivers list command, and make sure that the 515
  driver series (or higher) is listed.

   * Try installing the driver using the following command:
 sudo ubuntu-drivers install

   * Check which driver series was installed (you can use the "sudo
  ubuntu-drivers debug" command), and make sure that the installation
  does not cause ubuntu-drivers to crash.

  [ Where problems could occur ]

   * A problem in the ubuntu-drivers tool can cause it to install a driver which
 is not recommended for the detected hardware, or even cause the package
 installation to fail, and prevent users from logging in through the
 graphics interface.

  
  [ Other Info ]
   
   * To prevent failures of the test-suite on architectures such as armhf (as 
seen
 in Lunar), we are skipping the tests for any architectures other than amd64
 and arm64 (which are the only ones actually using ubuntu-drivers).
 This was already the case with riscv, and we now have an easier way
 to do so in the debian/rules file.

  
  == Changelogs ==

  === Kinetic and Jammy ===

[ Alberto Milone ]
* New upstream release:
* UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
of whether the --server parameter is passed in or not.
  - Update regex in nvidia_desktop_pre_installation_hook. This prevents
ubuntu-drivers from crashing when dealing with the -open NVIDIA
drivers (LP: #1993019).
* tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
modules over the -open ones, at least until the open modules catch up
feature wise and performance wise.

[ gongzhengyang ]
* UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
when catching ValueError (LP: #1993019).

[ Jeff Lane ]
* detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===

 * UbuntuDrivers/detect.py:
   - Make sure -open drivers have a lower priority (LP: #1988836).

  
  == Changelogs ==

  === Kinetic and Jammy ===

    [ Alberto Milone ]
    * debian/rules:
  - Limit the tests to the selected architectures (amd64, arm64).
    This prevents armhf builds from failing.
    * UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
    of whether the --server parameter is passed in or not.
  - Update regex and unify package name parsing in the following
    functions by using the new NvidiaPkgNameInfo class:
    nvidia_desktop_pre_installation_hook,
    _get_headless_no_dkms_metapackage,
    nvidia_desktop_pre_installation_hook,
    get_linux_modules_metapackage,
    This prevents ubuntu-drivers from crashing when dealing with
    the -open NVIDIA drivers (LP: #1993019).
    * tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
    modules over the -open ones, at least until the open modules catch up
    feature wise and performance wise.

    [ gongzhengyang ]
    * UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
    when catching ValueError (LP: #1993019).

    [ Jeff Lane ]
    * detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === 

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-06-01 Thread Seth Arnold
Alberto, it looks like nobody verified
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-
drivers-515/+bug/1988836

You can find the bugs that need verification or that failed verification
on https://ubuntu-archive-team.ubuntu.com/pending-sru.html

Thanks

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  Triaged
Status in ubuntu-drivers-common source package in Focal:
  Triaged
Status in ubuntu-drivers-common source package in Jammy:
  Fix Committed
Status in ubuntu-drivers-common source package in Kinetic:
  Fix Released

Bug description:
  [ Impact ]

   * The introduction of the -open NVIDIA drivers requires a change in
  the way we detect driver series and flavours. Failing to do so, causes
  the ubuntu-drivers tool to crash (LP: #1993019), or to prefer the
  -open drivers over the non-open ones (LP: #1988836).

   * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
  package is not installed (mainly on servers), ubuntu-drivers (through
  the sl-modem plugin) complains, unnecessarily about the missing aplay
  binary.

  [ Test Plan ]

   * Install the new ubuntu-drivers-common from -proposed on a system
  where the GPU is compatible with the 515 series (or higher).

   * Run the ubuntu-drivers list command, and make sure that the 515
  driver series (or higher) is listed.

   * Try installing the driver using the following command:
 sudo ubuntu-drivers install

   * Check which driver series was installed (you can use the "sudo
  ubuntu-drivers debug" command), and make sure that the installation
  does not cause ubuntu-drivers to crash.

  [ Where problems could occur ]

   * A problem in the ubuntu-drivers tool can cause it to install a driver which
 is not recommended for the detected hardware, or even cause the package
 installation to fail, and prevent users from logging in through the
 graphics interface.

  
  [ Other Info ]
   
   * To prevent failures of the test-suite on architectures such as armhf (as 
seen
 in Lunar), we are skipping the tests for any architectures other than amd64
 and arm64 (which are the only ones actually using ubuntu-drivers).
 This was already the case with riscv, and we now have an easier way
 to do so in the debian/rules file.

  
  == Changelogs ==

  === Kinetic and Jammy ===

[ Alberto Milone ]
* New upstream release:
* UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
of whether the --server parameter is passed in or not.
  - Update regex in nvidia_desktop_pre_installation_hook. This prevents
ubuntu-drivers from crashing when dealing with the -open NVIDIA
drivers (LP: #1993019).
* tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
modules over the -open ones, at least until the open modules catch up
feature wise and performance wise.

[ gongzhengyang ]
* UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
when catching ValueError (LP: #1993019).

[ Jeff Lane ]
* detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===

 * UbuntuDrivers/detect.py:
   - Make sure -open drivers have a lower priority (LP: #1988836).

  
  == Changelogs ==

  === Kinetic and Jammy ===

    [ Alberto Milone ]
    * debian/rules:
  - Limit the tests to the selected architectures (amd64, arm64).
    This prevents armhf builds from failing.
    * UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
    of whether the --server parameter is passed in or not.
  - Update regex and unify package name parsing in the following
    functions by using the new NvidiaPkgNameInfo class:
    nvidia_desktop_pre_installation_hook,
    _get_headless_no_dkms_metapackage,
    nvidia_desktop_pre_installation_hook,
    get_linux_modules_metapackage,
    This prevents ubuntu-drivers from crashing when dealing with
    the -open NVIDIA drivers (LP: #1993019).
    * tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
    modules over the -open ones, at least until the open modules catch up
    feature wise and performance wise.

    [ gongzhengyang ]
    * UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
    when catching ValueError (LP: #1993019).

    [ Jeff Lane ]
    * 

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-05-31 Thread Alberto Milone
Any reason for not releasing 0.9.6.2~0.22.04.3 to jammy-updates?

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  Triaged
Status in ubuntu-drivers-common source package in Focal:
  Triaged
Status in ubuntu-drivers-common source package in Jammy:
  Fix Committed
Status in ubuntu-drivers-common source package in Kinetic:
  Fix Released

Bug description:
  [ Impact ]

   * The introduction of the -open NVIDIA drivers requires a change in
  the way we detect driver series and flavours. Failing to do so, causes
  the ubuntu-drivers tool to crash (LP: #1993019), or to prefer the
  -open drivers over the non-open ones (LP: #1988836).

   * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
  package is not installed (mainly on servers), ubuntu-drivers (through
  the sl-modem plugin) complains, unnecessarily about the missing aplay
  binary.

  [ Test Plan ]

   * Install the new ubuntu-drivers-common from -proposed on a system
  where the GPU is compatible with the 515 series (or higher).

   * Run the ubuntu-drivers list command, and make sure that the 515
  driver series (or higher) is listed.

   * Try installing the driver using the following command:
 sudo ubuntu-drivers install

   * Check which driver series was installed (you can use the "sudo
  ubuntu-drivers debug" command), and make sure that the installation
  does not cause ubuntu-drivers to crash.

  [ Where problems could occur ]

   * A problem in the ubuntu-drivers tool can cause it to install a driver which
 is not recommended for the detected hardware, or even cause the package
 installation to fail, and prevent users from logging in through the
 graphics interface.

  
  [ Other Info ]
   
   * To prevent failures of the test-suite on architectures such as armhf (as 
seen
 in Lunar), we are skipping the tests for any architectures other than amd64
 and arm64 (which are the only ones actually using ubuntu-drivers).
 This was already the case with riscv, and we now have an easier way
 to do so in the debian/rules file.

  
  == Changelogs ==

  === Kinetic and Jammy ===

[ Alberto Milone ]
* New upstream release:
* UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
of whether the --server parameter is passed in or not.
  - Update regex in nvidia_desktop_pre_installation_hook. This prevents
ubuntu-drivers from crashing when dealing with the -open NVIDIA
drivers (LP: #1993019).
* tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
modules over the -open ones, at least until the open modules catch up
feature wise and performance wise.

[ gongzhengyang ]
* UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
when catching ValueError (LP: #1993019).

[ Jeff Lane ]
* detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===

 * UbuntuDrivers/detect.py:
   - Make sure -open drivers have a lower priority (LP: #1988836).

  
  == Changelogs ==

  === Kinetic and Jammy ===

    [ Alberto Milone ]
    * debian/rules:
  - Limit the tests to the selected architectures (amd64, arm64).
    This prevents armhf builds from failing.
    * UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
    of whether the --server parameter is passed in or not.
  - Update regex and unify package name parsing in the following
    functions by using the new NvidiaPkgNameInfo class:
    nvidia_desktop_pre_installation_hook,
    _get_headless_no_dkms_metapackage,
    nvidia_desktop_pre_installation_hook,
    get_linux_modules_metapackage,
    This prevents ubuntu-drivers from crashing when dealing with
    the -open NVIDIA drivers (LP: #1993019).
    * tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
    modules over the -open ones, at least until the open modules catch up
    feature wise and performance wise.

    [ gongzhengyang ]
    * UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
    when catching ValueError (LP: #1993019).

    [ Jeff Lane ]
    * detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===

     * UbuntuDrivers/detect.py:
   - Make sure -open 

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-04-27 Thread Christopher Perisho
Can someone tell me how to know when this fix hits the normal updates?
Or how long this normally takes? I don't want to mess with editing files
if I can help it, or attempting to not mess up my system by trying to
include proposed.

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  Triaged
Status in ubuntu-drivers-common source package in Focal:
  Triaged
Status in ubuntu-drivers-common source package in Jammy:
  Fix Committed
Status in ubuntu-drivers-common source package in Kinetic:
  Fix Released

Bug description:
  [ Impact ]

   * The introduction of the -open NVIDIA drivers requires a change in
  the way we detect driver series and flavours. Failing to do so, causes
  the ubuntu-drivers tool to crash (LP: #1993019), or to prefer the
  -open drivers over the non-open ones (LP: #1988836).

   * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
  package is not installed (mainly on servers), ubuntu-drivers (through
  the sl-modem plugin) complains, unnecessarily about the missing aplay
  binary.

  [ Test Plan ]

   * Install the new ubuntu-drivers-common from -proposed on a system
  where the GPU is compatible with the 515 series (or higher).

   * Run the ubuntu-drivers list command, and make sure that the 515
  driver series (or higher) is listed.

   * Try installing the driver using the following command:
 sudo ubuntu-drivers install

   * Check which driver series was installed (you can use the "sudo
  ubuntu-drivers debug" command), and make sure that the installation
  does not cause ubuntu-drivers to crash.

  [ Where problems could occur ]

   * A problem in the ubuntu-drivers tool can cause it to install a driver which
 is not recommended for the detected hardware, or even cause the package
 installation to fail, and prevent users from logging in through the
 graphics interface.

  
  [ Other Info ]
   
   * To prevent failures of the test-suite on architectures such as armhf (as 
seen
 in Lunar), we are skipping the tests for any architectures other than amd64
 and arm64 (which are the only ones actually using ubuntu-drivers).
 This was already the case with riscv, and we now have an easier way
 to do so in the debian/rules file.

  
  == Changelogs ==

  === Kinetic and Jammy ===

[ Alberto Milone ]
* New upstream release:
* UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
of whether the --server parameter is passed in or not.
  - Update regex in nvidia_desktop_pre_installation_hook. This prevents
ubuntu-drivers from crashing when dealing with the -open NVIDIA
drivers (LP: #1993019).
* tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
modules over the -open ones, at least until the open modules catch up
feature wise and performance wise.

[ gongzhengyang ]
* UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
when catching ValueError (LP: #1993019).

[ Jeff Lane ]
* detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===

 * UbuntuDrivers/detect.py:
   - Make sure -open drivers have a lower priority (LP: #1988836).

  
  == Changelogs ==

  === Kinetic and Jammy ===

    [ Alberto Milone ]
    * debian/rules:
  - Limit the tests to the selected architectures (amd64, arm64).
    This prevents armhf builds from failing.
    * UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
    of whether the --server parameter is passed in or not.
  - Update regex and unify package name parsing in the following
    functions by using the new NvidiaPkgNameInfo class:
    nvidia_desktop_pre_installation_hook,
    _get_headless_no_dkms_metapackage,
    nvidia_desktop_pre_installation_hook,
    get_linux_modules_metapackage,
    This prevents ubuntu-drivers from crashing when dealing with
    the -open NVIDIA drivers (LP: #1993019).
    * tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
    modules over the -open ones, at least until the open modules catch up
    feature wise and performance wise.

    [ gongzhengyang ]
    * UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
    when catching ValueError (LP: #1993019).

    [ Jeff Lane ]
    * detect-plugins/sl-modem.py:
  - Add some error 

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-03-21 Thread Launchpad Bug Tracker
This bug was fixed in the package ubuntu-drivers-common - 1:0.9.6.3.2

---
ubuntu-drivers-common (1:0.9.6.3.2) kinetic; urgency=medium

  * UbuntuDrivers/detect.py:
- Fix "882:5 local variable 'with_nvidia_kms' is assigned to
  but never used" FTBFS (triggered by tests/test_static.py).

ubuntu-drivers-common (1:0.9.6.3.1) kinetic; urgency=medium

  [ Alberto Milone ]
  * debian/rules:
- Limit the tests to the selected architectures (amd64, arm64).
  This prevents armhf builds from failing.
  * UbuntuDrivers/detect.py:
- Make sure all -open drivers have a lower priority, regardless
  of whether the --server parameter is passed in or not.
- Update regex and unify package name parsing in the following
  functions by using the new NvidiaPkgNameInfo class:
  nvidia_desktop_pre_installation_hook,
  _get_headless_no_dkms_metapackage,
  nvidia_desktop_pre_installation_hook,
  get_linux_modules_metapackage.
  This prevents ubuntu-drivers from crashing when dealing with
  the -open NVIDIA drivers (LP: #1993019).
  * tests/test_ubuntu_drivers.py:
- Add tests so we make sure to keep preferring non-open NVIDIA
  modules over the -open ones, at least until the open modules catch up
  feature wise and performance wise.

  [ gongzhengyang ]
  * UbuntuDrivers/detect.py:
- Fix local variable 'version' being referenced before assignment
  when catching ValueError (LP: #1993019).

  [ Jeff Lane ]
  * detect-plugins/sl-modem.py:
- Add some error trapping when aplay is not installed (on servers)
  (LP: #1935070).

 -- Alberto Milone   Wed, 08 Mar 2023
15:57:25 +

** Changed in: ubuntu-drivers-common (Ubuntu Kinetic)
   Status: Fix Committed => Fix Released

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  Triaged
Status in ubuntu-drivers-common source package in Focal:
  Triaged
Status in ubuntu-drivers-common source package in Jammy:
  Fix Committed
Status in ubuntu-drivers-common source package in Kinetic:
  Fix Released

Bug description:
  [ Impact ]

   * The introduction of the -open NVIDIA drivers requires a change in
  the way we detect driver series and flavours. Failing to do so, causes
  the ubuntu-drivers tool to crash (LP: #1993019), or to prefer the
  -open drivers over the non-open ones (LP: #1988836).

   * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
  package is not installed (mainly on servers), ubuntu-drivers (through
  the sl-modem plugin) complains, unnecessarily about the missing aplay
  binary.

  [ Test Plan ]

   * Install the new ubuntu-drivers-common from -proposed on a system
  where the GPU is compatible with the 515 series (or higher).

   * Run the ubuntu-drivers list command, and make sure that the 515
  driver series (or higher) is listed.

   * Try installing the driver using the following command:
 sudo ubuntu-drivers install

   * Check which driver series was installed (you can use the "sudo
  ubuntu-drivers debug" command), and make sure that the installation
  does not cause ubuntu-drivers to crash.

  [ Where problems could occur ]

   * A problem in the ubuntu-drivers tool can cause it to install a driver which
 is not recommended for the detected hardware, or even cause the package
 installation to fail, and prevent users from logging in through the
 graphics interface.

  
  [ Other Info ]
   
   * To prevent failures of the test-suite on architectures such as armhf (as 
seen
 in Lunar), we are skipping the tests for any architectures other than amd64
 and arm64 (which are the only ones actually using ubuntu-drivers).
 This was already the case with riscv, and we now have an easier way
 to do so in the debian/rules file.

  
  == Changelogs ==

  === Kinetic and Jammy ===

[ Alberto Milone ]
* New upstream release:
* UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
of whether the --server parameter is passed in or not.
  - Update regex in nvidia_desktop_pre_installation_hook. This prevents
ubuntu-drivers from crashing when dealing with the -open NVIDIA
drivers (LP: #1993019).
* tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
modules over the -open ones, at least until the open modules catch up
feature wise and performance wise.

[ gongzhengyang ]
* UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
when catching ValueError (LP: #1993019).

[ Jeff Lane ]
* 

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-03-13 Thread Alberto Milone
Note: neither in Jammy nor in Kinetic was the -open driver preferred
over its non-open counterpart, which is one of the things that we want
for this SRU.

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  Triaged
Status in ubuntu-drivers-common source package in Focal:
  Triaged
Status in ubuntu-drivers-common source package in Jammy:
  Fix Committed
Status in ubuntu-drivers-common source package in Kinetic:
  Fix Committed

Bug description:
  [ Impact ]

   * The introduction of the -open NVIDIA drivers requires a change in
  the way we detect driver series and flavours. Failing to do so, causes
  the ubuntu-drivers tool to crash (LP: #1993019), or to prefer the
  -open drivers over the non-open ones (LP: #1988836).

   * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
  package is not installed (mainly on servers), ubuntu-drivers (through
  the sl-modem plugin) complains, unnecessarily about the missing aplay
  binary.

  [ Test Plan ]

   * Install the new ubuntu-drivers-common from -proposed on a system
  where the GPU is compatible with the 515 series (or higher).

   * Run the ubuntu-drivers list command, and make sure that the 515
  driver series (or higher) is listed.

   * Try installing the driver using the following command:
 sudo ubuntu-drivers install

   * Check which driver series was installed (you can use the "sudo
  ubuntu-drivers debug" command), and make sure that the installation
  does not cause ubuntu-drivers to crash.

  [ Where problems could occur ]

   * A problem in the ubuntu-drivers tool can cause it to install a driver which
 is not recommended for the detected hardware, or even cause the package
 installation to fail, and prevent users from logging in through the
 graphics interface.

  
  [ Other Info ]
   
   * To prevent failures of the test-suite on architectures such as armhf (as 
seen
 in Lunar), we are skipping the tests for any architectures other than amd64
 and arm64 (which are the only ones actually using ubuntu-drivers).
 This was already the case with riscv, and we now have an easier way
 to do so in the debian/rules file.

  
  == Changelogs ==

  === Kinetic and Jammy ===

[ Alberto Milone ]
* New upstream release:
* UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
of whether the --server parameter is passed in or not.
  - Update regex in nvidia_desktop_pre_installation_hook. This prevents
ubuntu-drivers from crashing when dealing with the -open NVIDIA
drivers (LP: #1993019).
* tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
modules over the -open ones, at least until the open modules catch up
feature wise and performance wise.

[ gongzhengyang ]
* UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
when catching ValueError (LP: #1993019).

[ Jeff Lane ]
* detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===

 * UbuntuDrivers/detect.py:
   - Make sure -open drivers have a lower priority (LP: #1988836).

  
  == Changelogs ==

  === Kinetic and Jammy ===

    [ Alberto Milone ]
    * debian/rules:
  - Limit the tests to the selected architectures (amd64, arm64).
    This prevents armhf builds from failing.
    * UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
    of whether the --server parameter is passed in or not.
  - Update regex and unify package name parsing in the following
    functions by using the new NvidiaPkgNameInfo class:
    nvidia_desktop_pre_installation_hook,
    _get_headless_no_dkms_metapackage,
    nvidia_desktop_pre_installation_hook,
    get_linux_modules_metapackage,
    This prevents ubuntu-drivers from crashing when dealing with
    the -open NVIDIA drivers (LP: #1993019).
    * tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
    modules over the -open ones, at least until the open modules catch up
    feature wise and performance wise.

    [ gongzhengyang ]
    * UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
    when catching ValueError (LP: #1993019).

    [ Jeff Lane ]
    * detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === Jammy only (left over from 

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-03-13 Thread Alberto Milone
The installation proceeded as expected in Jammy.

:~$ apt-cache policy ubuntu-drivers-common
ubuntu-drivers-common:
  Installed: 1:0.9.6.2~0.22.04.3
  Candidate: 1:0.9.6.2~0.22.04.3
  Version table:
 *** 1:0.9.6.2~0.22.04.3 500
500 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
100 /var/lib/dpkg/status
 1:0.9.6.1 500
500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages

You can see the attached output of "ubuntu-drivers debug"

** Attachment added: "jammy"
   
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+attachment/5654197/+files/jammy

** Tags removed: verification-needed verification-needed-jammy
** Tags added: verification-done verification-done-jammy

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  Triaged
Status in ubuntu-drivers-common source package in Focal:
  Triaged
Status in ubuntu-drivers-common source package in Jammy:
  Fix Committed
Status in ubuntu-drivers-common source package in Kinetic:
  Fix Committed

Bug description:
  [ Impact ]

   * The introduction of the -open NVIDIA drivers requires a change in
  the way we detect driver series and flavours. Failing to do so, causes
  the ubuntu-drivers tool to crash (LP: #1993019), or to prefer the
  -open drivers over the non-open ones (LP: #1988836).

   * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
  package is not installed (mainly on servers), ubuntu-drivers (through
  the sl-modem plugin) complains, unnecessarily about the missing aplay
  binary.

  [ Test Plan ]

   * Install the new ubuntu-drivers-common from -proposed on a system
  where the GPU is compatible with the 515 series (or higher).

   * Run the ubuntu-drivers list command, and make sure that the 515
  driver series (or higher) is listed.

   * Try installing the driver using the following command:
 sudo ubuntu-drivers install

   * Check which driver series was installed (you can use the "sudo
  ubuntu-drivers debug" command), and make sure that the installation
  does not cause ubuntu-drivers to crash.

  [ Where problems could occur ]

   * A problem in the ubuntu-drivers tool can cause it to install a driver which
 is not recommended for the detected hardware, or even cause the package
 installation to fail, and prevent users from logging in through the
 graphics interface.

  
  [ Other Info ]
   
   * To prevent failures of the test-suite on architectures such as armhf (as 
seen
 in Lunar), we are skipping the tests for any architectures other than amd64
 and arm64 (which are the only ones actually using ubuntu-drivers).
 This was already the case with riscv, and we now have an easier way
 to do so in the debian/rules file.

  
  == Changelogs ==

  === Kinetic and Jammy ===

[ Alberto Milone ]
* New upstream release:
* UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
of whether the --server parameter is passed in or not.
  - Update regex in nvidia_desktop_pre_installation_hook. This prevents
ubuntu-drivers from crashing when dealing with the -open NVIDIA
drivers (LP: #1993019).
* tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
modules over the -open ones, at least until the open modules catch up
feature wise and performance wise.

[ gongzhengyang ]
* UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
when catching ValueError (LP: #1993019).

[ Jeff Lane ]
* detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===

 * UbuntuDrivers/detect.py:
   - Make sure -open drivers have a lower priority (LP: #1988836).

  
  == Changelogs ==

  === Kinetic and Jammy ===

    [ Alberto Milone ]
    * debian/rules:
  - Limit the tests to the selected architectures (amd64, arm64).
    This prevents armhf builds from failing.
    * UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
    of whether the --server parameter is passed in or not.
  - Update regex and unify package name parsing in the following
    functions by using the new NvidiaPkgNameInfo class:
    nvidia_desktop_pre_installation_hook,
    _get_headless_no_dkms_metapackage,
    nvidia_desktop_pre_installation_hook,
    get_linux_modules_metapackage,
    This prevents ubuntu-drivers from crashing when dealing with
    

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-03-13 Thread Alberto Milone
The installation proceeded as expected in Kinetic.

:~$ apt-cache policy ubuntu-drivers-common
ubuntu-drivers-common:
  Installed: 1:0.9.6.3.2
  Candidate: 1:0.9.6.3.2
  Version table:
 *** 1:0.9.6.3.2 400
400 http://archive.ubuntu.com/ubuntu kinetic-proposed/main amd64 
Packages
100 /var/lib/dpkg/status
 1:0.9.6.3 500
500 http://it.archive.ubuntu.com/ubuntu kinetic/main amd64 Packages

You can see the attached output of "ubuntu-drivers debug"

** Attachment added: "kinetic"
   
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+attachment/5654171/+files/kinetic

** Tags removed: verification-needed-kinetic
** Tags added: verification-done-kinetic

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  Triaged
Status in ubuntu-drivers-common source package in Focal:
  Triaged
Status in ubuntu-drivers-common source package in Jammy:
  Fix Committed
Status in ubuntu-drivers-common source package in Kinetic:
  Fix Committed

Bug description:
  [ Impact ]

   * The introduction of the -open NVIDIA drivers requires a change in
  the way we detect driver series and flavours. Failing to do so, causes
  the ubuntu-drivers tool to crash (LP: #1993019), or to prefer the
  -open drivers over the non-open ones (LP: #1988836).

   * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
  package is not installed (mainly on servers), ubuntu-drivers (through
  the sl-modem plugin) complains, unnecessarily about the missing aplay
  binary.

  [ Test Plan ]

   * Install the new ubuntu-drivers-common from -proposed on a system
  where the GPU is compatible with the 515 series (or higher).

   * Run the ubuntu-drivers list command, and make sure that the 515
  driver series (or higher) is listed.

   * Try installing the driver using the following command:
 sudo ubuntu-drivers install

   * Check which driver series was installed (you can use the "sudo
  ubuntu-drivers debug" command), and make sure that the installation
  does not cause ubuntu-drivers to crash.

  [ Where problems could occur ]

   * A problem in the ubuntu-drivers tool can cause it to install a driver which
 is not recommended for the detected hardware, or even cause the package
 installation to fail, and prevent users from logging in through the
 graphics interface.

  
  [ Other Info ]
   
   * To prevent failures of the test-suite on architectures such as armhf (as 
seen
 in Lunar), we are skipping the tests for any architectures other than amd64
 and arm64 (which are the only ones actually using ubuntu-drivers).
 This was already the case with riscv, and we now have an easier way
 to do so in the debian/rules file.

  
  == Changelogs ==

  === Kinetic and Jammy ===

[ Alberto Milone ]
* New upstream release:
* UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
of whether the --server parameter is passed in or not.
  - Update regex in nvidia_desktop_pre_installation_hook. This prevents
ubuntu-drivers from crashing when dealing with the -open NVIDIA
drivers (LP: #1993019).
* tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
modules over the -open ones, at least until the open modules catch up
feature wise and performance wise.

[ gongzhengyang ]
* UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
when catching ValueError (LP: #1993019).

[ Jeff Lane ]
* detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===

 * UbuntuDrivers/detect.py:
   - Make sure -open drivers have a lower priority (LP: #1988836).

  
  == Changelogs ==

  === Kinetic and Jammy ===

    [ Alberto Milone ]
    * debian/rules:
  - Limit the tests to the selected architectures (amd64, arm64).
    This prevents armhf builds from failing.
    * UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
    of whether the --server parameter is passed in or not.
  - Update regex and unify package name parsing in the following
    functions by using the new NvidiaPkgNameInfo class:
    nvidia_desktop_pre_installation_hook,
    _get_headless_no_dkms_metapackage,
    nvidia_desktop_pre_installation_hook,
    get_linux_modules_metapackage,
    This prevents ubuntu-drivers from crashing when dealing with
    the -open NVIDIA drivers (LP: #1993019).
    

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-03-02 Thread Timo Aaltonen
Hello Seth, or anyone else affected,

Accepted ubuntu-drivers-common into jammy-proposed. The package will
build now and be available at
https://launchpad.net/ubuntu/+source/ubuntu-drivers-
common/1:0.9.6.2~0.22.04.2 in a few hours, and then in the -proposed
repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
jammy to verification-done-jammy. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-jammy. In either case, without details of your testing we will
not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: ubuntu-drivers-common (Ubuntu Jammy)
   Status: In Progress => Fix Committed

** Tags added: verification-needed-jammy

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  Triaged
Status in ubuntu-drivers-common source package in Focal:
  Triaged
Status in ubuntu-drivers-common source package in Jammy:
  Fix Committed
Status in ubuntu-drivers-common source package in Kinetic:
  Fix Committed

Bug description:
  [ Impact ]

   * The introduction of the -open NVIDIA drivers requires a change in
  the way we detect driver series and flavours. Failing to do so, causes
  the ubuntu-drivers tool to crash (LP: #1993019), or to prefer the
  -open drivers over the non-open ones (LP: #1988836).

   * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
  package is not installed (mainly on servers), ubuntu-drivers (through
  the sl-modem plugin) complains, unnecessarily about the missing aplay
  binary.

  [ Test Plan ]

   * Install the new ubuntu-drivers-common from -proposed on a system
  where the GPU is compatible with the 515 series (or higher).

   * Run the ubuntu-drivers list command, and make sure that the 515
  driver series (or higher) is listed.

   * Try installing the driver using the following command:
 sudo ubuntu-drivers install

   * Check which driver series was installed (you can use the "sudo
  ubuntu-drivers debug" command), and make sure that the installation
  does not cause ubuntu-drivers to crash.

  [ Where problems could occur ]

   * A problem in the ubuntu-drivers tool can cause it to install a driver which
 is not recommended for the detected hardware, or even cause the package
 installation to fail, and prevent users from logging in through the
 graphics interface.

  
  [ Other Info ]
   
   * To prevent failures of the test-suite on architectures such as armhf (as 
seen
 in Lunar), we are skipping the tests for any architectures other than amd64
 and arm64 (which are the only ones actually using ubuntu-drivers).
 This was already the case with riscv, and we now have an easier way
 to do so in the debian/rules file.

  
  == Changelogs ==

  === Kinetic and Jammy ===

[ Alberto Milone ]
* New upstream release:
* UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
of whether the --server parameter is passed in or not.
  - Update regex in nvidia_desktop_pre_installation_hook. This prevents
ubuntu-drivers from crashing when dealing with the -open NVIDIA
drivers (LP: #1993019).
* tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
modules over the -open ones, at least until the open modules catch up
feature wise and performance wise.

[ gongzhengyang ]
* UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
when catching ValueError (LP: #1993019).

[ Jeff Lane ]
* detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===

 * UbuntuDrivers/detect.py:
   - Make sure -open drivers have a lower priority (LP: #1988836).

  
  == Changelogs ==

  === Kinetic and Jammy ===

    [ Alberto Milone ]
    * 

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-03-02 Thread Timo Aaltonen
Hello Seth, or anyone else affected,

Accepted ubuntu-drivers-common into kinetic-proposed. The package will
build now and be available at
https://launchpad.net/ubuntu/+source/ubuntu-drivers-common/1:0.9.6.3.1
in a few hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
kinetic to verification-done-kinetic. If it does not fix the bug for
you, please add a comment stating that, and change the tag to
verification-failed-kinetic. In either case, without details of your
testing we will not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: ubuntu-drivers-common (Ubuntu Kinetic)
   Status: In Progress => Fix Committed

** Tags added: verification-needed verification-needed-kinetic

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  Triaged
Status in ubuntu-drivers-common source package in Focal:
  Triaged
Status in ubuntu-drivers-common source package in Jammy:
  Fix Committed
Status in ubuntu-drivers-common source package in Kinetic:
  Fix Committed

Bug description:
  [ Impact ]

   * The introduction of the -open NVIDIA drivers requires a change in
  the way we detect driver series and flavours. Failing to do so, causes
  the ubuntu-drivers tool to crash (LP: #1993019), or to prefer the
  -open drivers over the non-open ones (LP: #1988836).

   * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
  package is not installed (mainly on servers), ubuntu-drivers (through
  the sl-modem plugin) complains, unnecessarily about the missing aplay
  binary.

  [ Test Plan ]

   * Install the new ubuntu-drivers-common from -proposed on a system
  where the GPU is compatible with the 515 series (or higher).

   * Run the ubuntu-drivers list command, and make sure that the 515
  driver series (or higher) is listed.

   * Try installing the driver using the following command:
 sudo ubuntu-drivers install

   * Check which driver series was installed (you can use the "sudo
  ubuntu-drivers debug" command), and make sure that the installation
  does not cause ubuntu-drivers to crash.

  [ Where problems could occur ]

   * A problem in the ubuntu-drivers tool can cause it to install a driver which
 is not recommended for the detected hardware, or even cause the package
 installation to fail, and prevent users from logging in through the
 graphics interface.

  
  [ Other Info ]
   
   * To prevent failures of the test-suite on architectures such as armhf (as 
seen
 in Lunar), we are skipping the tests for any architectures other than amd64
 and arm64 (which are the only ones actually using ubuntu-drivers).
 This was already the case with riscv, and we now have an easier way
 to do so in the debian/rules file.

  
  == Changelogs ==

  === Kinetic and Jammy ===

[ Alberto Milone ]
* New upstream release:
* UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
of whether the --server parameter is passed in or not.
  - Update regex in nvidia_desktop_pre_installation_hook. This prevents
ubuntu-drivers from crashing when dealing with the -open NVIDIA
drivers (LP: #1993019).
* tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
modules over the -open ones, at least until the open modules catch up
feature wise and performance wise.

[ gongzhengyang ]
* UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
when catching ValueError (LP: #1993019).

[ Jeff Lane ]
* detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===

 * UbuntuDrivers/detect.py:
   - Make sure -open drivers have a lower priority (LP: #1988836).

  
  == Changelogs ==

  === Kinetic and Jammy ===

    [ 

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-02-23 Thread Alberto Milone
** Changed in: ubuntu-drivers-common (Ubuntu Bionic)
   Status: In Progress => Triaged

** Changed in: ubuntu-drivers-common (Ubuntu Focal)
   Status: In Progress => Triaged

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  Triaged
Status in ubuntu-drivers-common source package in Focal:
  Triaged
Status in ubuntu-drivers-common source package in Jammy:
  In Progress
Status in ubuntu-drivers-common source package in Kinetic:
  In Progress

Bug description:
  [ Impact ]

   * The introduction of the -open NVIDIA drivers requires a change in
  the way we detect driver series and flavours. Failing to do so, causes
  the ubuntu-drivers tool to crash (LP: #1993019), or to prefer the
  -open drivers over the non-open ones (LP: #1988836).

   * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
  package is not installed (mainly on servers), ubuntu-drivers (through
  the sl-modem plugin) complains, unnecessarily about the missing aplay
  binary.

  [ Test Plan ]

   * Install the new ubuntu-drivers-common from -proposed on a system
  where the GPU is compatible with the 515 series (or higher).

   * Run the ubuntu-drivers list command, and make sure that the 515
  driver series (or higher) is listed.

   * Try installing the driver using the following command:
 sudo ubuntu-drivers install

   * Check which driver series was installed (you can use the "sudo
  ubuntu-drivers debug" command), and make sure that the installation
  does not cause ubuntu-drivers to crash.

  [ Where problems could occur ]

   * A problem in the ubuntu-drivers tool can cause it to install a driver which
 is not recommended for the detected hardware, or even cause the package
 installation to fail, and prevent users from logging in through the
 graphics interface.

  
  [ Other Info ]
   
   * To prevent failures of the test-suite on architectures such as armhf (as 
seen
 in Lunar), we are skipping the tests for any architectures other than amd64
 and arm64 (which are the only ones actually using ubuntu-drivers).
 This was already the case with riscv, and we now have an easier way
 to do so in the debian/rules file.

  
  == Changelogs ==

  === Kinetic and Jammy ===

[ Alberto Milone ]
* New upstream release:
* UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
of whether the --server parameter is passed in or not.
  - Update regex in nvidia_desktop_pre_installation_hook. This prevents
ubuntu-drivers from crashing when dealing with the -open NVIDIA
drivers (LP: #1993019).
* tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
modules over the -open ones, at least until the open modules catch up
feature wise and performance wise.

[ gongzhengyang ]
* UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
when catching ValueError (LP: #1993019).

[ Jeff Lane ]
* detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===

 * UbuntuDrivers/detect.py:
   - Make sure -open drivers have a lower priority (LP: #1988836).

  
  == Changelogs ==

  === Kinetic and Jammy ===

    [ Alberto Milone ]
    * debian/rules:
  - Limit the tests to the selected architectures (amd64, arm64).
    This prevents armhf builds from failing.
    * UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
    of whether the --server parameter is passed in or not.
  - Update regex and unify package name parsing in the following
    functions by using the new NvidiaPkgNameInfo class:
    nvidia_desktop_pre_installation_hook,
    _get_headless_no_dkms_metapackage,
    nvidia_desktop_pre_installation_hook,
    get_linux_modules_metapackage,
    This prevents ubuntu-drivers from crashing when dealing with
    the -open NVIDIA drivers (LP: #1993019).
    * tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
    modules over the -open ones, at least until the open modules catch up
    feature wise and performance wise.

    [ gongzhengyang ]
    * UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
    when catching ValueError (LP: #1993019).

    [ Jeff Lane ]
    * detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).

  === 

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-02-23 Thread Alberto Milone
** Description changed:

+ [ Impact ]
+ 
+  * The introduction of the -open NVIDIA drivers requires a change in the
+ way we detect driver series and flavours. Failing to do so, causes the
+ ubuntu-drivers tool to crash (LP: #1993019), or to prefer the -open
+ drivers over the non-open ones (LP: #1988836).
+ 
+  * Furthermore, calling the ubuntu-drivers tool where the alsa-utils
+ package is not installed (mainly on servers), ubuntu-drivers (through
+ the sl-modem plugin) complains, unnecessarily about the missing aplay
+ binary.
+ 
+ [ Test Plan ]
+ 
+  * Install the new ubuntu-drivers-common from -proposed on a system
+ where the GPU is compatible with the 515 series (or higher).
+ 
+  * Run the ubuntu-drivers list command, and make sure that the 515
+ driver series (or higher) is listed.
+ 
+  * Try installing the driver using the following command:
+sudo ubuntu-drivers install
+ 
+  * Check which driver series was installed (you can use the "sudo
+ ubuntu-drivers debug" command), and make sure that the installation does
+ not cause ubuntu-drivers to crash.
+ 
+ [ Where problems could occur ]
+ 
+  * A problem in the ubuntu-drivers tool can cause it to install a driver which
+is not recommended for the detected hardware, or even cause the package
+installation to fail, and prevent users from logging in through the
+graphics interface.
+ 
+ 
+ [ Other Info ]
+  
+  * To prevent failures of the test-suite on architectures such as armhf (as 
seen
+in Lunar), we are skipping the tests for any architectures other than amd64
+and arm64 (which are the only ones actually using ubuntu-drivers).
+This was already the case with riscv, and we now have an easier way
+to do so in the debian/rules file.
+ 
+ 
+ == Changelogs ==
+ 
+ === Kinetic and Jammy ===
+ 
+   [ Alberto Milone ]
+   * New upstream release:
+   * UbuntuDrivers/detect.py:
+ - Make sure all -open drivers have a lower priority, regardless
+   of whether the --server parameter is passed in or not.
+ - Update regex in nvidia_desktop_pre_installation_hook. This prevents
+   ubuntu-drivers from crashing when dealing with the -open NVIDIA
+   drivers (LP: #1993019).
+   * tests/test_ubuntu_drivers.py:
+ - Add tests so we make sure to keep preferring non-open NVIDIA
+   modules over the -open ones, at least until the open modules catch up
+   feature wise and performance wise.
+ 
+   [ gongzhengyang ]
+   * UbuntuDrivers/detect.py:
+ - Fix local variable 'version' being referenced before assignment
+   when catching ValueError (LP: #1993019).
+ 
+   [ Jeff Lane ]
+   * detect-plugins/sl-modem.py:
+ - Add some error trapping when aplay is not installed (on servers).
+ 
+ === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===
+ 
+* UbuntuDrivers/detect.py:
+  - Make sure -open drivers have a lower priority (LP: #1988836).
+ 
+ 
  == Changelogs ==
  
  === Kinetic and Jammy ===
  
    [ Alberto Milone ]
    * debian/rules:
  - Limit the tests to the selected architectures (amd64, arm64).
    This prevents armhf builds from failing.
    * UbuntuDrivers/detect.py:
  - Make sure all -open drivers have a lower priority, regardless
    of whether the --server parameter is passed in or not.
  - Update regex and unify package name parsing in the following
    functions by using the new NvidiaPkgNameInfo class:
    nvidia_desktop_pre_installation_hook,
    _get_headless_no_dkms_metapackage,
    nvidia_desktop_pre_installation_hook,
    get_linux_modules_metapackage,
    This prevents ubuntu-drivers from crashing when dealing with
    the -open NVIDIA drivers (LP: #1993019).
    * tests/test_ubuntu_drivers.py:
  - Add tests so we make sure to keep preferring non-open NVIDIA
    modules over the -open ones, at least until the open modules catch up
    feature wise and performance wise.
  
    [ gongzhengyang ]
    * UbuntuDrivers/detect.py:
  - Fix local variable 'version' being referenced before assignment
    when catching ValueError (LP: #1993019).
  
    [ Jeff Lane ]
    * detect-plugins/sl-modem.py:
  - Add some error trapping when aplay is not installed (on servers).
  
  === Jammy only (left over from 1:0.9.6.2~0.22.04.1) ===
  
-* UbuntuDrivers/detect.py:
-  - Make sure -open drivers have a lower priority (LP: #1988836).
+    * UbuntuDrivers/detect.py:
+  - Make sure -open drivers have a lower priority (LP: #1988836).
  
  
  Hello, we received a drive-by complaint about the ubuntu-drivers autoinstall 
tool:
  
  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24
  
  The contents of the pastebin:
  
  Traceback (most recent call last):
    File "/usr/bin/ubuntu-drivers", line 513, in 
  greet()
    File 

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-02-23 Thread Alberto Milone
** Description changed:

- Hello, we received a drive-by complaint about the ubuntu-drivers
- autoinstall tool:
+ == Changelogs ==
+ 
+ === Kinetic and Jammy ===
+ 
+   [ Alberto Milone ]
+   * debian/rules:
+ - Limit the tests to the selected architectures (amd64, arm64).
+   This prevents armhf builds from failing.
+   * UbuntuDrivers/detect.py:
+ - Make sure all -open drivers have a lower priority, regardless
+   of whether the --server parameter is passed in or not.
+ - Update regex and unify package name parsing in the following
+   functions by using the new NvidiaPkgNameInfo class:
+   nvidia_desktop_pre_installation_hook,
+   _get_headless_no_dkms_metapackage, 
+   nvidia_desktop_pre_installation_hook,
+   get_linux_modules_metapackage,
+   This prevents ubuntu-drivers from crashing when dealing with
+   the -open NVIDIA drivers (LP: #1993019).
+   * tests/test_ubuntu_drivers.py:
+ - Add tests so we make sure to keep preferring non-open NVIDIA
+   modules over the -open ones, at least until the open modules catch up
+   feature wise and performance wise.
+ 
+   [ gongzhengyang ]
+   * UbuntuDrivers/detect.py:
+ - Fix local variable 'version' being referenced before assignment
+   when catching ValueError (LP: #1993019).
+ 
+   [ Jeff Lane ]
+   * detect-plugins/sl-modem.py:
+ - Add some error trapping when aplay is not installed (on servers).
+ 
+ 
+ Hello, we received a drive-by complaint about the ubuntu-drivers autoinstall 
tool:
  
  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24
  
  The contents of the pastebin:
  
  Traceback (most recent call last):
-   File "/usr/bin/ubuntu-drivers", line 513, in 
- 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
+   File "/usr/bin/ubuntu-drivers", line 513, in 
+ 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
- 
  
  Skimming the version on my system it sure feels plausible:
  
  def nvidia_desktop_pre_installation_hook(to_install):
- '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
- with_nvidia_kms = False
+ '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
+ with_nvidia_kms = False
  
- # Enable KMS if nvidia >= 470
- for package_name in to_install:
- if 

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-01-13 Thread Alberto Milone
** Also affects: ubuntu-drivers-common (Ubuntu Kinetic)
   Importance: Undecided
   Status: New

** Also affects: ubuntu-drivers-common (Ubuntu Focal)
   Importance: Undecided
   Status: New

** Also affects: ubuntu-drivers-common (Ubuntu Jammy)
   Importance: Undecided
   Status: New

** Also affects: ubuntu-drivers-common (Ubuntu Bionic)
   Importance: Undecided
   Status: New

** Changed in: ubuntu-drivers-common (Ubuntu)
   Status: Confirmed => Fix Released

** Changed in: ubuntu-drivers-common (Ubuntu Kinetic)
   Status: New => In Progress

** Changed in: ubuntu-drivers-common (Ubuntu Jammy)
   Status: New => In Progress

** Changed in: ubuntu-drivers-common (Ubuntu Focal)
   Status: New => In Progress

** Changed in: ubuntu-drivers-common (Ubuntu Bionic)
   Status: New => In Progress

** Changed in: ubuntu-drivers-common (Ubuntu Bionic)
 Assignee: (unassigned) => Alberto Milone (albertomilone)

** Changed in: ubuntu-drivers-common (Ubuntu Focal)
 Assignee: (unassigned) => Alberto Milone (albertomilone)

** Changed in: ubuntu-drivers-common (Ubuntu Jammy)
 Assignee: (unassigned) => Alberto Milone (albertomilone)

** Changed in: ubuntu-drivers-common (Ubuntu Kinetic)
 Assignee: (unassigned) => Alberto Milone (albertomilone)

** Changed in: ubuntu-drivers-common (Ubuntu Bionic)
   Importance: Undecided => High

** Changed in: ubuntu-drivers-common (Ubuntu Focal)
   Importance: Undecided => High

** Changed in: ubuntu-drivers-common (Ubuntu Jammy)
   Importance: Undecided => High

** Changed in: ubuntu-drivers-common (Ubuntu Kinetic)
   Importance: Undecided => High

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Fix Released
Status in ubuntu-drivers-common source package in Bionic:
  In Progress
Status in ubuntu-drivers-common source package in Focal:
  In Progress
Status in ubuntu-drivers-common source package in Jammy:
  In Progress
Status in ubuntu-drivers-common source package in Kinetic:
  In Progress

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+subscriptions


-- 
Mailing list: 

[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-01-11 Thread Gabriel Devenyi
The proposed change breaks extraction for drivers without -open.

A more appropriate fix is to regex extract the version number:
```
version = int(re.findall("[0-9]+", package_name)[0]
```

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2023-01-05 Thread Alberto Milone
** Changed in: ubuntu-drivers-common (Ubuntu)
 Assignee: (unassigned) => Alberto Milone (albertomilone)

** Changed in: ubuntu-drivers-common (Ubuntu)
   Importance: Undecided => High

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-12-20 Thread Leonardo Veiga
I have nvidia-520 installed for a while. After noticing that the
packages have been kept back (don't know why), I tried to upgrade the
driver from the "Software and Updates" GUI. Not possible, all options
grayed out and a message reads "This device is using a manually-
installed driver".

Then I tried to "sudo ubuntu-drivers autoinstall", and got the error
"UnboundLocalError: local variable 'version' referenced before
assignment" and to this bug report.

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-11-16 Thread Bill Gan
I have also encountered this issue

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-11-05 Thread JK
I've just experienced the same issue, but with the ubuntu driver tool
GUI (on Ubuntu 22.04).

I tried to change the NVIDIA drivers from 515 to 520-open. After asking
for my password I got a pop-up with a big grey "X" and an "OK" button,
but no text. Not helpful at all. Then I took a look at the installed
"*nvidia*" packages with dpkg and noticed that all 515 packages had been
removed but no 520 packages had been installed. When executing "ubuntu-
drivers autoinstall" I got the same Python exception as above.

After that, I installed the 520 drivers with

"apt install nvidia-driver-520-open"

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-11-01 Thread Guilherme Alvarenga
I have the same issue but I can't edit 'detect.py' as other people have
suggested. It is a read-only file and I can't edit it. Any ideas how to
do so? My issue is also that my second and third monitors are mostly
black. Sometimes they work out of nowhere but then it goes out again.

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-10-26 Thread D F
Also have this. Decided to update drivers after failure to run steam
app. autoinstall fails

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-10-22 Thread SzySzySzy
What happened that it broken so many ppl things? wtf ubuntu
My gpu stopped detecting other two displays and one display has limited 
resolution. It was working!!! Stopped working few days ago
3080TI if that helps.. I think it's for nvidia only, but someone messed 
something pretty badly..

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-10-17 Thread Gustavo Canabrava
Have the same problem using a Ideapad 3i. The solution provided by
Weston Kelliher works, with a few start up problems, but all right now.

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-10-17 Thread Sebastien Bacher
** Tags added: rls-jj-incoming

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-10-15 Thread Vic Lim
I confirmed @westonkelliher 's method and I have changed the python
script with the file name '{usr-directory}/detect.py and it worked.

Thanks @westonkelliher !

# detect.py
def nvidia_desktop_pre_installation_hook(to_install):
'''Applies changes that need to happen before installing the NVIDIA 
drivers'''
with_nvidia_kms = False

# Enable KMS if nvidia >= 470
for package_name in to_install:
if package_name.startswith('nvidia-driver-'):
try:
version = int(package_name.split('-')[-2]) #Line 839
except ValueError:
pass
finally:
with_nvidia_kms = version >= 470

if with_nvidia_kms:
set_nvidia_kms(1)

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-10-15 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: ubuntu-drivers-common (Ubuntu)
   Status: New => Confirmed

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-10-15 Thread Weston Kelliher
I also ran into this issue. In my case the package names were `nvidia-
driver-515-open` and `nvidia-dkms-515-open` so I changed `version =
int(package_name.split('-')[-1])` to `version =
int(package_name.split('-')[2])` and that worked for me (`sudo ubuntu-
drivers install` ran to completion). Not sure if that is a robust
solution as I don't know how consistent the package names are. Also I'm
new here.

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  Confirmed

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-10-14 Thread Onno
See screenshot for message


** Attachment added: "screenshot-1.png"
   
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+attachment/5624257/+files/screenshot-1.png

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  New

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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


[Desktop-packages] [Bug 1993019] Re: UnboundLocalError: local variable 'version' referenced before assignment

2022-10-14 Thread Onno
I saw the same issue. I performed fresh Ubuntu 22.04.1 install on Dell
Precision 7540. First attempt I immediately installed proprietary
drivers by enabling this third party option in install dialog. After
this Software & Updates do not allow update. All options are greyed out
and cannot be enabled. There is a message "This device is using a
manually-installed driver"

Second attempt I installed without proprietary drivers / with third
party disabled. After installation and reboot Software & Updates does
allow me to select a proprietary driver. There is no longer a message
"This device is using a manually-installed driver"

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

Title:
  UnboundLocalError: local variable 'version' referenced before
  assignment

Status in ubuntu-drivers-common package in Ubuntu:
  New

Bug description:
  Hello, we received a drive-by complaint about the ubuntu-drivers
  autoinstall tool:

  < Fhazal> hye i have problem with ubuntu 22.04 nvidia auto install command
  < Fhazal> this error appear when i try to auto install recommended driver
  < Fhazal> https://pastebin.com/ydZVFT24

  The contents of the pastebin:

  Traceback (most recent call last):
File "/usr/bin/ubuntu-drivers", line 513, in 
  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

  
  Skimming the version on my system it sure feels plausible:

  def nvidia_desktop_pre_installation_hook(to_install):
  '''Applies changes that need to happen before installing the NVIDIA 
drivers'''
  with_nvidia_kms = False

  # Enable KMS if nvidia >= 470
  for package_name in to_install:
  if package_name.startswith('nvidia-driver-'):
  try:
  version = int(package_name.split('-')[-1])
  except ValueError:
  pass
  finally:
  with_nvidia_kms = version >= 470

  if with_nvidia_kms:
  set_nvidia_kms(1)


  If there was an exception splitting, indexing, or converting to an
  int, that 'version' variable may not have a value.

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1993019/+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