[Bug 1958227] Re: Traceback when calling "poetry" command: ModuleNotFoundError: No module named 'cachecontrol'

Rolf Leggewie 1958227 at bugs.launchpad.net
Wed Jan 11 17:15:25 UTC 2023


** Patch added: "proposed solution for kinetic"
   https://bugs.launchpad.net/ubuntu/+source/poetry/+bug/1958227/+attachment/5640782/+files/LP1958227-kinetic.debdiff

** Patch removed: "proposed solution for kinetic"
   https://bugs.launchpad.net/ubuntu/+source/poetry/+bug/1958227/+attachment/5640781/+files/LP1958227-kinetic.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1958227

Title:
  Traceback when calling "poetry" command: ModuleNotFoundError: No
  module named 'cachecontrol'

Status in poetry package in Ubuntu:
  Confirmed
Status in poetry source package in Jammy:
  Triaged
Status in poetry package in Debian:
  Fix Released

Bug description:
  I installed poetry via apt (on Jammy amd64) and when I try to call the
  program, I get:

  $ poetry
  Traceback (most recent call last):
    File "/usr/bin/poetry", line 5, in <module>
      from poetry.console import main
    File "/usr/lib/python3/dist-packages/poetry/console/__init__.py", line 1, in <module>
      from .application import Application
    File "/usr/lib/python3/dist-packages/poetry/console/application.py", line 7, in <module>
      from .commands.about import AboutCommand
    File "/usr/lib/python3/dist-packages/poetry/console/commands/__init__.py", line 4, in <module>
      from .check import CheckCommand
    File "/usr/lib/python3/dist-packages/poetry/console/commands/check.py", line 2, in <module>
      from poetry.factory import Factory
    File "/usr/lib/python3/dist-packages/poetry/factory.py", line 18, in <module>
      from .repositories.pypi_repository import PyPiRepository
    File "/usr/lib/python3/dist-packages/poetry/repositories/pypi_repository.py", line 11, in <module>
      from cachecontrol import CacheControl
  ModuleNotFoundError: No module named 'cachecontrol'

  $ dpkg -l|grep python3-poetry
  ii  python3-poetry                                   1.1.12+dfsg-1                              all          Python dependency management and packaging made easy (Python 3)
  ii  python3-poetry-core                              1.0.7-2                                    all          Poetry PEP 517 Build Backend

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: python3-poetry 1.1.12+dfsg-1
  ProcVersionSignature: Ubuntu 5.13.0-22.22-generic 5.13.19
  Uname: Linux 5.13.0-22-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.11-0ubuntu75
  Architecture: amd64
  CasperMD5CheckResult: unknown
  CurrentDesktop: ubuntu:GNOME
  Date: Tue Jan 18 10:49:59 2022
  InstallationDate: Installed on 2020-12-08 (405 days ago)
  InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Release amd64 (20201022)
  PackageArchitecture: all
  RebootRequiredPkgs: Error: path contained symlinks.
  SourcePackage: poetry
  UpgradeStatus: Upgraded to jammy on 2021-11-30 (49 days ago)

  ### SRU process ###

  [Impact]

  Problem: the python3-poetry package misses a run-time dependency on python3-cachecontrol
  Result: the poetry program "crashes" on startup

  Users expect packages from the official repository to work out of the
  box.  This is not the case here as can be seen above unless the user
  happens to already have the python3-cachecontrol package installed.

  The release in lunar was fixed through a later release in Debian and
  is not affected by this bug as can be verified from the Debian BTS.

  [Test]

  1) spin up a jammy virtual server or other test environment, no GUI is required.
  2) "sudo apt purge python3-cachecontrol;sudo apt install python3-poetry"
  3) "poetry" -> failure with current package
  4) "sudo apt install python3-cachecontrol"
  5) "poetry" -> no more failure

  [Regression potential]

  The python3-cachecontrol package is required for the poetry binary to
  start successfully.  This change does not introduce any change in code
  execution paths and should thus be free from introducing any
  regression.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/poetry/+bug/1958227/+subscriptions




More information about the Ubuntu-sponsors mailing list