[Bug 2049217] Re: requestsync fails with ModuleNotFoundError: No module named 'keyring' error

Chris Peterson 2049217 at bugs.launchpad.net
Fri Feb 9 03:17:50 UTC 2024


>Otherwise every user of python3-launchpadlib will need a Depends on
python3-keyring which seems non-intuitive to me.

Agreed. The situation isn't great.
 
The doc string for the offending function (login_with):

https://git.launchpad.net/ubuntu/+source/python-
launchpadlib/tree/src/launchpadlib/launchpad.py#n522

seems to imply this entire function is useless unless invoked on a
desktop system. So the commit message saying "perfectly usable" without
python3-keyring wasn't correct.

The problem is that making python-launchpadlib Recommend/Depend
python3-keyring causes many packages to be installed on systems that
don't need them (i.e. server), which is I think is worse than requiring
a conditional install of another package.

I think in the ideal scenario the two use cases for python-launchpadlib
would be split into two packages (desktop/non-desktop).

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-launchpadlib in Ubuntu.
https://bugs.launchpad.net/bugs/2049217

Title:
  requestsync fails with ModuleNotFoundError: No module named 'keyring'
  error

Status in python-launchpadlib package in Ubuntu:
  Confirmed
Status in ubuntu-dev-tools package in Ubuntu:
  Confirmed

Bug description:
  Ubuntu Noble

  requestsync has started failing on this version of Ubuntu

  $ requestsync mkosi
  Traceback (most recent call last):
    File "/usr/bin/requestsync", line 402, in <module>
      main()
    File "/usr/bin/requestsync", line 187, in main
      Launchpad.login(service=args.lpinstance, api_version="devel")
    File "/usr/lib/python3/dist-packages/ubuntutools/lp/lpapicache.py", line 84, in login
      self.__lp = LP.login_with("ubuntu-dev-tools", service, version=api_version)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 700, in login_with
      return cls._authorize_token_and_login(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 445, in _authorize_token_and_login
      cached_credentials = credential_store.load(
                           ^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 345, in load
      return self.do_load(unique_key)
             ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 423, in do_load
      self._ensure_keyring_imported()
    File "/usr/lib/python3/dist-packages/launchpadlib/credentials.py", line 388, in _ensure_keyring_imported
      import keyring
  ModuleNotFoundError: No module named 'keyring'

  ProblemType: Bug
  DistroRelease: Ubuntu 24.04
  Package: ubuntu-dev-tools 0.197
  ProcVersionSignature: User Name 6.5.0-9.9-generic 6.5.3
  Uname: Linux 6.5.0-9-generic x86_64
  ApportVersion: 2.27.0-0ubuntu6
  Architecture: amd64
  CasperMD5CheckResult: unknown
  CloudArchitecture: x86_64
  CloudBuildName: server
  CloudID: brightbox
  CloudName: brightbox
  CloudPlatform: ec2
  CloudRegion: gb1s-
  CloudSerial: 20240104
  CloudSubPlatform: metadata (http://169.254.169.254)
  Date: Fri Jan 12 16:18:42 2024
  PackageArchitecture: all
  SourcePackage: ubuntu-dev-tools
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-launchpadlib/+bug/2049217/+subscriptions




More information about the foundations-bugs mailing list