Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poetry install fails when updating certifi when poetry config virtualenvs.create false --local is set #4470

Closed
3 tasks done
eoshea-cmt opened this issue Sep 2, 2021 · 2 comments
Labels
kind/bug Something isn't working as expected

Comments

@eoshea-cmt
Copy link

eoshea-cmt commented Sep 2, 2021

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • Ubuntu 20.04 (in docker)
  • Poetry version: 1.1.8
  • Link of a Gist sorry, I don't have this

Issue

There seems to be an issue running poetry install when:

  • poetry updates the certifi package
  • config virtualenvs.create is set to false

My understanding (guess) is that, since poetry updates packages in parallel, if it is updating the certifi package while updating others, it can fail to find a cert. In the stack trace that I will post, it is clear that certifi is updating when the error happens. I believe this is some race condition because it happened to a coworker 2/3 times when he encountered the bug.
In the case where I am posting, it was happening consistently.

A workaround for this is to move away from using poetry config virtualenvs.create false, which I can do in one project, but not another.

Any help would be appreciated.

Full output:

Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file

Finding the necessary packages for the current system

Package operations: 165 installs, 31 updates, 0 removals, 3 skipped

  • Removing pywin32 (301): Skipped for the following reason: Not currently installed
  • Removing pywin32-ctypes (0.2.0): Skipped for the following reason: Not currently installed
  • Removing pywinpty (1.1.3): Skipped for the following reason: Not currently installed
  • Installing decorator (4.4.2)
  • Installing ipython-genutils (0.2.0)
  • Updating six (1.16.0 /usr/local/lib/python3.8/dist-packages -> 1.16.0)
  • Installing attrs (19.3.0)
  • Installing parso (0.4.0)
  • Updating ptyprocess (0.7.0 /usr/local/lib/python3.8/dist-packages -> 0.6.0)
  • Updating pyparsing (2.4.7 /usr/local/lib/python3.8/dist-packages -> 2.4.7)
  • Installing pyrsistent (0.14.11)
  • Installing traitlets (4.3.3)
  • Installing wcwidth (0.1.9)
  • Installing backcall (0.1.0)
  • Installing jedi (0.14.0)
  • Installing jsonschema (3.2.0)
  • Installing jupyter-core (4.7.1)
  • Updating packaging (20.9 /usr/local/lib/python3.8/dist-packages -> 21.0)
  • Installing pickleshare (0.7.5)
  • Updating pexpect (4.8.0 /usr/local/lib/python3.8/dist-packages -> 4.8.0)
  • Installing markupsafe (1.1.1)
  • Installing prompt-toolkit (2.0.10)
  • Installing pygments (2.10.0)
  • Installing python-dateutil (2.8.2)
  • Installing pyzmq (19.0.2)
  • Installing tornado (6.1)
  • Updating webencodings (0.5.1 /usr/local/lib/python3.8/dist-packages -> 0.5.1)
  • Installing bleach (3.3.1)
  • Installing defusedxml (0.5.0)
  • Installing entrypoints (0.3)
  • Installing ipython (7.19.0)
  • Installing jinja2 (2.11.3)
  • Installing jupyter-client (5.3.5)
  • Installing mistune (0.8.4)
  • Installing nbformat (4.4.0)
  • Installing pandocfilters (1.4.3)
  • Updating pycparser (2.20 /usr/local/lib/python3.8/dist-packages -> 2.20)
  • Installing testpath (0.4.4)
  • Updating cffi (1.14.6 /usr/local/lib/python3.8/dist-packages -> 1.14.6)
  • Updating idna (3.2 /usr/local/lib/python3.8/dist-packages -> 3.2)
  • Installing ipykernel (5.5.5)
  • Installing multidict (5.1.0)
  • Installing nbconvert (5.6.1)
  • Installing prometheus-client (0.6.0)
  • Installing send2trash (1.8.0)
  • Installing terminado (0.8.3)
  • Installing async-timeout (3.0.1)
  • Updating certifi (2021.5.30 /usr/local/lib/python3.8/dist-packages -> 2021.5.30)
  • Installing chardet (4.0.0)
  • Updating charset-normalizer (2.0.4 /usr/local/lib/python3.8/dist-packages -> 2.0.4)
  • Updating cryptography (3.4.8 /usr/local/lib/python3.8/dist-packages -> 3.4.8)
  • Updating jeepney (0.7.1 /usr/local/lib/python3.8/dist-packages -> 0.7.1)
  • Installing jmespath (0.10.0)
  • Installing notebook (5.7.13)
  • Updating pastel (0.2.1 /usr/local/lib/python3.8/dist-packages -> 0.2.1)
Retrying HTTP request in 0.5 seconds.
  • Updating pylev (1.4.0 /usr/local/lib/python3.8/dist-packages -> 1.4.0)

  Stack trace:

  15  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:202 in _execute_operation
       200│
       201│             try:
     → 202│                 result = self._do_execute_operation(operation)
       203│             except EnvCommandError as e:
       204│                 if e.e.returncode == -2:

  14  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:276 in _do_execute_operation
       274│             return 0
       275│
     → 276│         result = getattr(self, "_execute_{}".format(method))(operation)
       277│
       278│         if result != 0:

  13  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:414 in _execute_update
       412│
       413│     def _execute_update(self, operation):  # type: (Update) -> None
     → 414│         return self._update(operation)
       415│
       416│     def _execute_uninstall(self, operation):  # type: (Uninstall) -> None

  12  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:452 in _update
       450│
       451│     def _update(self, operation):
     → 452│         return self._install(operation)
       453│
       454│     def _remove(self, operation):

  11  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:437 in _install
       435│             archive = self._download_link(operation, Link(package.source_url))
       436│         else:
     → 437│             archive = self._download(operation)
       438│
       439│         operation_message = self.get_operation_message(operation)

  10  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:583 in _download
       581│
       582│     def _download(self, operation):  # type: (Operation) -> Path
     → 583│         link = self._chooser.choose_for(operation.package)
       584│
       585│         return self._download_link(operation, link)

   9  /usr/local/lib/python3.8/dist-packages/poetry/installation/chooser.py:60 in choose_for
Retrying HTTP request in 1.0 seconds.
        58│         """
        59│         links = []
     →  60│         for link in self._get_links(package):
        61│             if link.is_wheel and not Wheel(link.filename).is_supported_by_environment(
        62│                 self._env

   8  /usr/local/lib/python3.8/dist-packages/poetry/installation/chooser.py:94 in _get_links
        92│             repository = self._pool.repository(package.source_reference)
        93│
     →  94│         links = repository.find_links_for_package(package)
        95│
        96│         hashes = [f["hash"] for f in package.files]

   7  /usr/local/lib/python3.8/dist-packages/poetry/repositories/legacy_repository.py:331 in find_links_for_package
       329│
       330│     def find_links_for_package(self, package):
     → 331│         page = self._get("/{}/".format(package.name.replace(".", "-")))
       332│         if page is None:
       333│             return []

   6  /usr/local/lib/python3.8/dist-packages/poetry/repositories/legacy_repository.py:388 in _get
       386│         url = self._url + endpoint
       387│         try:
     → 388│             response = self.session.get(url)
       389│             if response.status_code == 404:
       390│                 return

   5  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:555 in get
       553│
       554│         kwargs.setdefault('allow_redirects', True)
     → 555│         return self.request('GET', url, **kwargs)
       556│
       557│     def options(self, url, **kwargs):

   4  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:542 in request
       540│         }
       541│         send_kwargs.update(settings)
     → 542│         resp = self.send(prep, **send_kwargs)
       543│
       544│         return resp

   3  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:655 in send
       653│
       654│         # Send the request
     → 655│         r = adapter.send(request, **kwargs)
       656│
       657│         # Total elapsed time of the request (approximately)

   2  /usr/local/lib/python3.8/dist-packages/cachecontrol/adapter.py:53 in send
        51│             request.headers.update(self.controller.conditional_headers(request))
        52│
     →  53│         resp = super(CacheControlAdapter, self).send(request, **kw)
        54│
        55│         return resp

   1  /usr/local/lib/python3.8/dist-packages/requests/adapters.py:416 in send
       414│             raise InvalidURL(e, request=request)
       415│
     → 416│         self.cert_verify(conn, request.url, verify, cert)
       417│         url = self.request_url(request, proxies)
       418│         self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)

  OSError

  Could not find a suitable TLS CA certificate bundle, invalid path: /usr/local/lib/python3.8/dist-packages/certifi/cacert.pem

  at /usr/local/lib/python3.8/dist-packages/requests/adapters.py:227 in cert_verify
      223│             if not cert_loc:
      224│                 cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
      225│
      226│             if not cert_loc or not os.path.exists(cert_loc):
    → 227│                 raise IOError("Could not find a suitable TLS CA certificate bundle, "
      228│                               "invalid path: {}".format(cert_loc))
      229│
      230│             conn.cert_reqs = 'CERT_REQUIRED'
      231│

  • Installing pytz (2018.9)
  • Installing typing-extensions (3.10.0.2)
  • Updating urllib3 (1.26.6 /usr/local/lib/python3.8/dist-packages -> 1.26.6)
  • Installing yarl (1.6.3)

  Stack trace:

  14  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:202 in _execute_operation
       200│
       201│             try:
     → 202│                 result = self._do_execute_operation(operation)
       203│             except EnvCommandError as e:
       204│                 if e.e.returncode == -2:

  13  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:276 in _do_execute_operation
       274│             return 0
       275│
     → 276│         result = getattr(self, "_execute_{}".format(method))(operation)
       277│
       278│         if result != 0:

  12  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:411 in _execute_install
       409│
       410│     def _execute_install(self, operation):  # type: (Install) -> None
     → 411│         return self._install(operation)
       412│
       413│     def _execute_update(self, operation):  # type: (Update) -> None

  11  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:437 in _install
       435│             archive = self._download_link(operation, Link(package.source_url))
       436│         else:
     → 437│             archive = self._download(operation)
       438│
       439│         operation_message = self.get_operation_message(operation)

  10  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:583 in _download
       581│
       582│     def _download(self, operation):  # type: (Operation) -> Path
     → 583│         link = self._chooser.choose_for(operation.package)
       584│
       585│         return self._download_link(operation, link)

   9  /usr/local/lib/python3.8/dist-packages/poetry/installation/chooser.py:60 in choose_for
        58│         """
        59│         links = []
     →  60│         for link in self._get_links(package):
        61│             if link.is_wheel and not Wheel(link.filename).is_supported_by_environment(
        62│                 self._env

   8  /usr/local/lib/python3.8/dist-packages/poetry/installation/chooser.py:94 in _get_links
        92│             repository = self._pool.repository(package.source_reference)
        93│
     →  94│         links = repository.find_links_for_package(package)
        95│
        96│         hashes = [f["hash"] for f in package.files]

   7  /usr/local/lib/python3.8/dist-packages/poetry/repositories/legacy_repository.py:331 in find_links_for_package
       329│
       330│     def find_links_for_package(self, package):
     → 331│         page = self._get("/{}/".format(package.name.replace(".", "-")))
       332│         if page is None:
       333│             return []

   6  /usr/local/lib/python3.8/dist-packages/poetry/repositories/legacy_repository.py:388 in _get
       386│         url = self._url + endpoint
       387│         try:
     → 388│             response = self.session.get(url)
       389│             if response.status_code == 404:
       390│                 return

   5  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:555 in get
       553│
       554│         kwargs.setdefault('allow_redirects', True)
     → 555│         return self.request('GET', url, **kwargs)
       556│
       557│     def options(self, url, **kwargs):

   4  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:542 in request
       540│         }
       541│         send_kwargs.update(settings)
     → 542│         resp = self.send(prep, **send_kwargs)
       543│
       544│         return resp

   3  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:655 in send
       653│
       654│         # Send the request
     → 655│         r = adapter.send(request, **kwargs)
       656│
       657│         # Total elapsed time of the request (approximately)

   2  /usr/local/lib/python3.8/dist-packages/cachecontrol/adapter.py:53 in send
        51│             request.headers.update(self.controller.conditional_headers(request))
        52│
     →  53│         resp = super(CacheControlAdapter, self).send(request, **kw)
        54│
        55│         return resp

   1  /usr/local/lib/python3.8/dist-packages/requests/adapters.py:416 in send
       414│             raise InvalidURL(e, request=request)
       415│
     → 416│         self.cert_verify(conn, request.url, verify, cert)
       417│         url = self.request_url(request, proxies)
       418│         self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)

  OSError

  Could not find a suitable TLS CA certificate bundle, invalid path: /usr/local/lib/python3.8/dist-packages/certifi/cacert.pem

  at /usr/local/lib/python3.8/dist-packages/requests/adapters.py:227 in cert_verify
      223│             if not cert_loc:
      224│                 cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
      225│
      226│             if not cert_loc or not os.path.exists(cert_loc):
    → 227│                 raise IOError("Could not find a suitable TLS CA certificate bundle, "
      228│                               "invalid path: {}".format(cert_loc))
      229│
      230│             conn.cert_reqs = 'CERT_REQUIRED'
      231│


  Stack trace:

  14  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:202 in _execute_operation
       200│
       201│             try:
     → 202│                 result = self._do_execute_operation(operation)
       203│             except EnvCommandError as e:
       204│                 if e.e.returncode == -2:

  13  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:276 in _do_execute_operation
       274│             return 0
       275│
     → 276│         result = getattr(self, "_execute_{}".format(method))(operation)
       277│
       278│         if result != 0:

  12  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:411 in _execute_install
       409│
       410│     def _execute_install(self, operation):  # type: (Install) -> None
     → 411│         return self._install(operation)
       412│
       413│     def _execute_update(self, operation):  # type: (Update) -> None

  11  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:437 in _install
       435│             archive = self._download_link(operation, Link(package.source_url))
       436│         else:
     → 437│             archive = self._download(operation)
       438│
       439│         operation_message = self.get_operation_message(operation)

  10  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:583 in _download
       581│
       582│     def _download(self, operation):  # type: (Operation) -> Path
     → 583│         link = self._chooser.choose_for(operation.package)
       584│
       585│         return self._download_link(operation, link)

   9  /usr/local/lib/python3.8/dist-packages/poetry/installation/chooser.py:60 in choose_for
        58│         """
        59│         links = []
     →  60│         for link in self._get_links(package):
        61│             if link.is_wheel and not Wheel(link.filename).is_supported_by_environment(
        62│                 self._env

   8  /usr/local/lib/python3.8/dist-packages/poetry/installation/chooser.py:94 in _get_links
        92│             repository = self._pool.repository(package.source_reference)
        93│
     →  94│         links = repository.find_links_for_package(package)
        95│
        96│         hashes = [f["hash"] for f in package.files]

   7  /usr/local/lib/python3.8/dist-packages/poetry/repositories/legacy_repository.py:331 in find_links_for_package
       329│
       330│     def find_links_for_package(self, package):
     → 331│         page = self._get("/{}/".format(package.name.replace(".", "-")))
       332│         if page is None:
       333│             return []

   6  /usr/local/lib/python3.8/dist-packages/poetry/repositories/legacy_repository.py:388 in _get
       386│         url = self._url + endpoint
       387│         try:
     → 388│             response = self.session.get(url)
       389│             if response.status_code == 404:
       390│                 return

   5  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:555 in get
       553│
       554│         kwargs.setdefault('allow_redirects', True)
     → 555│         return self.request('GET', url, **kwargs)
       556│
       557│     def options(self, url, **kwargs):

   4  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:542 in request
       540│         }
       541│         send_kwargs.update(settings)
     → 542│         resp = self.send(prep, **send_kwargs)
       543│
       544│         return resp

   3  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:655 in send
       653│
       654│         # Send the request
     → 655│         r = adapter.send(request, **kwargs)
       656│
       657│         # Total elapsed time of the request (approximately)

   2  /usr/local/lib/python3.8/dist-packages/cachecontrol/adapter.py:53 in send
        51│             request.headers.update(self.controller.conditional_headers(request))
        52│
     →  53│         resp = super(CacheControlAdapter, self).send(request, **kw)
        54│
        55│         return resp

   1  /usr/local/lib/python3.8/dist-packages/requests/adapters.py:416 in send
       414│             raise InvalidURL(e, request=request)
       415│
     → 416│         self.cert_verify(conn, request.url, verify, cert)
       417│         url = self.request_url(request, proxies)
       418│         self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)

  OSError

  Could not find a suitable TLS CA certificate bundle, invalid path: /usr/local/lib/python3.8/dist-packages/certifi/cacert.pem

  at /usr/local/lib/python3.8/dist-packages/requests/adapters.py:227 in cert_verify
      223│             if not cert_loc:
      224│                 cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
      225│
      226│             if not cert_loc or not os.path.exists(cert_loc):
    → 227│                 raise IOError("Could not find a suitable TLS CA certificate bundle, "
      228│                               "invalid path: {}".format(cert_loc))
      229│
      230│             conn.cert_reqs = 'CERT_REQUIRED'
      231│


  Stack trace:

  15  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:202 in _execute_operation
       200│
       201│             try:
     → 202│                 result = self._do_execute_operation(operation)
       203│             except EnvCommandError as e:
       204│                 if e.e.returncode == -2:

  14  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:276 in _do_execute_operation
       274│             return 0
       275│
     → 276│         result = getattr(self, "_execute_{}".format(method))(operation)
       277│
       278│         if result != 0:

  13  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:414 in _execute_update
       412│
       413│     def _execute_update(self, operation):  # type: (Update) -> None
     → 414│         return self._update(operation)
       415│
       416│     def _execute_uninstall(self, operation):  # type: (Uninstall) -> None

  12  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:452 in _update
       450│
       451│     def _update(self, operation):
     → 452│         return self._install(operation)
       453│
       454│     def _remove(self, operation):

  11  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:437 in _install
       435│             archive = self._download_link(operation, Link(package.source_url))
       436│         else:
     → 437│             archive = self._download(operation)
       438│
       439│         operation_message = self.get_operation_message(operation)

  10  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:583 in _download
       581│
       582│     def _download(self, operation):  # type: (Operation) -> Path
     → 583│         link = self._chooser.choose_for(operation.package)
       584│
       585│         return self._download_link(operation, link)

   9  /usr/local/lib/python3.8/dist-packages/poetry/installation/chooser.py:60 in choose_for
        58│         """
        59│         links = []
     →  60│         for link in self._get_links(package):
        61│             if link.is_wheel and not Wheel(link.filename).is_supported_by_environment(
        62│                 self._env

   8  /usr/local/lib/python3.8/dist-packages/poetry/installation/chooser.py:94 in _get_links
        92│             repository = self._pool.repository(package.source_reference)
        93│
     →  94│         links = repository.find_links_for_package(package)
        95│
        96│         hashes = [f["hash"] for f in package.files]

   7  /usr/local/lib/python3.8/dist-packages/poetry/repositories/legacy_repository.py:331 in find_links_for_package
       329│
       330│     def find_links_for_package(self, package):
     → 331│         page = self._get("/{}/".format(package.name.replace(".", "-")))
       332│         if page is None:
       333│             return []

   6  /usr/local/lib/python3.8/dist-packages/poetry/repositories/legacy_repository.py:388 in _get
       386│         url = self._url + endpoint
       387│         try:
     → 388│             response = self.session.get(url)
       389│             if response.status_code == 404:
       390│                 return

   5  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:555 in get
       553│
       554│         kwargs.setdefault('allow_redirects', True)
     → 555│         return self.request('GET', url, **kwargs)
       556│
       557│     def options(self, url, **kwargs):

   4  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:542 in request
       540│         }
       541│         send_kwargs.update(settings)
     → 542│         resp = self.send(prep, **send_kwargs)
       543│
       544│         return resp

   3  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:655 in send
       653│
       654│         # Send the request
     → 655│         r = adapter.send(request, **kwargs)
       656│
       657│         # Total elapsed time of the request (approximately)

   2  /usr/local/lib/python3.8/dist-packages/cachecontrol/adapter.py:53 in send
        51│             request.headers.update(self.controller.conditional_headers(request))
        52│
     →  53│         resp = super(CacheControlAdapter, self).send(request, **kw)
        54│
        55│         return resp

   1  /usr/local/lib/python3.8/dist-packages/requests/adapters.py:416 in send
       414│             raise InvalidURL(e, request=request)
       415│
     → 416│         self.cert_verify(conn, request.url, verify, cert)
       417│         url = self.request_url(request, proxies)
       418│         self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)

  OSError

  Could not find a suitable TLS CA certificate bundle, invalid path: /usr/local/lib/python3.8/dist-packages/certifi/cacert.pem

  at /usr/local/lib/python3.8/dist-packages/requests/adapters.py:227 in cert_verify
      223│             if not cert_loc:
      224│                 cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
      225│
      226│             if not cert_loc or not os.path.exists(cert_loc):
    → 227│                 raise IOError("Could not find a suitable TLS CA certificate bundle, "
      228│                               "invalid path: {}".format(cert_loc))
      229│
      230│             conn.cert_reqs = 'CERT_REQUIRED'
      231│


  Stack trace:

  14  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:202 in _execute_operation
       200│
       201│             try:
     → 202│                 result = self._do_execute_operation(operation)
       203│             except EnvCommandError as e:
       204│                 if e.e.returncode == -2:

  13  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:276 in _do_execute_operation
       274│             return 0
       275│
     → 276│         result = getattr(self, "_execute_{}".format(method))(operation)
       277│
       278│         if result != 0:

  12  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:411 in _execute_install
       409│
       410│     def _execute_install(self, operation):  # type: (Install) -> None
     → 411│         return self._install(operation)
       412│
       413│     def _execute_update(self, operation):  # type: (Update) -> None

  11  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:437 in _install
       435│             archive = self._download_link(operation, Link(package.source_url))
       436│         else:
     → 437│             archive = self._download(operation)
       438│
       439│         operation_message = self.get_operation_message(operation)

  10  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:583 in _download
       581│
       582│     def _download(self, operation):  # type: (Operation) -> Path
     → 583│         link = self._chooser.choose_for(operation.package)
       584│
       585│         return self._download_link(operation, link)

   9  /usr/local/lib/python3.8/dist-packages/poetry/installation/chooser.py:60 in choose_for
        58│         """
        59│         links = []
     →  60│         for link in self._get_links(package):
        61│             if link.is_wheel and not Wheel(link.filename).is_supported_by_environment(
        62│                 self._env

   8  /usr/local/lib/python3.8/dist-packages/poetry/installation/chooser.py:94 in _get_links
        92│             repository = self._pool.repository(package.source_reference)
        93│
     →  94│         links = repository.find_links_for_package(package)
        95│
        96│         hashes = [f["hash"] for f in package.files]

   7  /usr/local/lib/python3.8/dist-packages/poetry/repositories/legacy_repository.py:331 in find_links_for_package
       329│
       330│     def find_links_for_package(self, package):
     → 331│         page = self._get("/{}/".format(package.name.replace(".", "-")))
       332│         if page is None:
       333│             return []

   6  /usr/local/lib/python3.8/dist-packages/poetry/repositories/legacy_repository.py:388 in _get
       386│         url = self._url + endpoint
       387│         try:
     → 388│             response = self.session.get(url)
       389│             if response.status_code == 404:
       390│                 return

   5  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:555 in get
       553│
       554│         kwargs.setdefault('allow_redirects', True)
     → 555│         return self.request('GET', url, **kwargs)
       556│
       557│     def options(self, url, **kwargs):

   4  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:542 in request
       540│         }
       541│         send_kwargs.update(settings)
     → 542│         resp = self.send(prep, **send_kwargs)
       543│
       544│         return resp

   3  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:655 in send
       653│
       654│         # Send the request
     → 655│         r = adapter.send(request, **kwargs)
       656│
       657│         # Total elapsed time of the request (approximately)

   2  /usr/local/lib/python3.8/dist-packages/cachecontrol/adapter.py:53 in send
        51│             request.headers.update(self.controller.conditional_headers(request))
        52│
     →  53│         resp = super(CacheControlAdapter, self).send(request, **kw)
        54│
        55│         return resp

   1  /usr/local/lib/python3.8/dist-packages/requests/adapters.py:416 in send
       414│             raise InvalidURL(e, request=request)
       415│
     → 416│         self.cert_verify(conn, request.url, verify, cert)
       417│         url = self.request_url(request, proxies)
       418│         self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)

  OSError

  Could not find a suitable TLS CA certificate bundle, invalid path: /usr/local/lib/python3.8/dist-packages/certifi/cacert.pem

  at /usr/local/lib/python3.8/dist-packages/requests/adapters.py:227 in cert_verify
      223│             if not cert_loc:
      224│                 cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
      225│
      226│             if not cert_loc or not os.path.exists(cert_loc):
    → 227│                 raise IOError("Could not find a suitable TLS CA certificate bundle, "
      228│                               "invalid path: {}".format(cert_loc))
      229│
      230│             conn.cert_reqs = 'CERT_REQUIRED'
      231│

Retrying HTTP request in 1.5 seconds.
Retrying HTTP request in 2.0 seconds.
Retrying HTTP request in 2.5 seconds.

  Stack trace:

  8  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:202 in _execute_operation
      200│
      201│             try:
    → 202│                 result = self._do_execute_operation(operation)
      203│             except EnvCommandError as e:
      204│                 if e.e.returncode == -2:

  7  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:276 in _do_execute_operation
      274│             return 0
      275│
    → 276│         result = getattr(self, "_execute_{}".format(method))(operation)
      277│
      278│         if result != 0:

  6  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:414 in _execute_update
      412│
      413│     def _execute_update(self, operation):  # type: (Update) -> None
    → 414│         return self._update(operation)
      415│
      416│     def _execute_uninstall(self, operation):  # type: (Uninstall) -> None

  5  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:452 in _update
      450│
      451│     def _update(self, operation):
    → 452│         return self._install(operation)
      453│
      454│     def _remove(self, operation):

  4  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:449 in _install
      447│             args.insert(2, "-U")
      448│
    → 449│         return self.run_pip(*args)
      450│
      451│     def _update(self, operation):

  3  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:300 in run_pip
      298│     def run_pip(self, *args, **kwargs):  # type: (...) -> int
      299│         try:
    → 300│             self._env.run_pip(*args, **kwargs)
      301│         except EnvCommandError as e:
      302│             output = decode(e.e.output)

  2  /usr/local/lib/python3.8/dist-packages/poetry/utils/env.py:1069 in run_pip
      1067│         pip = self.get_pip_command()
      1068│         cmd = pip + list(args)
    → 1069│         return self._run(cmd, **kwargs)
      1070│
      1071│     def _run(self, cmd, **kwargs):

  1  /usr/local/lib/python3.8/dist-packages/poetry/utils/env.py:1351 in _run
      1349│     def _run(self, cmd, **kwargs):
      1350│         kwargs["env"] = self.get_temp_environ(environ=kwargs.get("env"))
    → 1351│         return super(VirtualEnv, self)._run(cmd, **kwargs)
      1352│
      1353│     def get_temp_environ(

  EnvCommandError

  Command ['/usr/bin/pip', 'install', '--no-deps', '-U', '/root/.cache/pypoetry/artifacts/71/6b/cd/37f3851e14b2473e34fa8fb99677497a1c6229d1a55bf28633818f3378/cryptography-3.4.8-cp36-abi3-manylinux_2_24_x86_64.whl'] errored with the following return code 1, and output:
  ERROR: cryptography-3.4.8-cp36-abi3-manylinux_2_24_x86_64.whl is not a supported wheel on this platform.


  at /usr/local/lib/python3.8/dist-packages/poetry/utils/env.py:1101 in _run
      1097│                 output = subprocess.check_output(
      1098│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1099│                 )
      1100│         except CalledProcessError as e:
    → 1101│             raise EnvCommandError(e, input=input_)
      1102│
      1103│         return decode(output)
      1104│
      1105│     def execute(self, bin, *args, **kwargs):


  Stack trace:

  12  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:202 in _execute_operation
       200│
       201│             try:
     → 202│                 result = self._do_execute_operation(operation)
       203│             except EnvCommandError as e:
       204│                 if e.e.returncode == -2:

  11  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:276 in _do_execute_operation
       274│             return 0
       275│
     → 276│         result = getattr(self, "_execute_{}".format(method))(operation)
       277│
       278│         if result != 0:

  10  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:414 in _execute_update
       412│
       413│     def _execute_update(self, operation):  # type: (Update) -> None
     → 414│         return self._update(operation)
       415│
       416│     def _execute_uninstall(self, operation):  # type: (Uninstall) -> None

   9  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:452 in _update
       450│
       451│     def _update(self, operation):
     → 452│         return self._install(operation)
       453│
       454│     def _remove(self, operation):

   8  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:437 in _install
       435│             archive = self._download_link(operation, Link(package.source_url))
       436│         else:
     → 437│             archive = self._download(operation)
       438│
       439│         operation_message = self.get_operation_message(operation)

   7  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:585 in _download
       583│         link = self._chooser.choose_for(operation.package)
       584│
     → 585│         return self._download_link(operation, link)
       586│
       587│     def _download_link(self, operation, link):

   6  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:594 in _download_link
       592│             # No cached distributions was found, so we download and prepare it
       593│             try:
     → 594│                 archive = self._download_archive(operation, link)
       595│             except BaseException:
       596│                 cache_directory = self._chef.get_cache_directory_for_link(link)

   5  /usr/local/lib/python3.8/dist-packages/poetry/installation/executor.py:620 in _download_archive
       618│
       619│     def _download_archive(self, operation, link):  # type: (Operation, Link) -> Path
     → 620│         response = self._authenticator.request(
       621│             "get", link.url, stream=True, io=self._sections.get(id(operation), self._io)
       622│         )

   4  /usr/local/lib/python3.8/dist-packages/poetry/installation/authenticator.py:85 in request
        83│             except (requests.exceptions.ConnectionError, OSError) as e:
        84│                 if is_last_attempt:
     →  85│                     raise e
        86│             else:
        87│                 if resp.status_code not in [502, 503, 504] or is_last_attempt:

   3  /usr/local/lib/python3.8/dist-packages/poetry/installation/authenticator.py:82 in request
        80│             is_last_attempt = attempt >= 5
        81│             try:
     →  82│                 resp = session.send(prepared_request, **send_kwargs)
        83│             except (requests.exceptions.ConnectionError, OSError) as e:
        84│                 if is_last_attempt:

   2  /usr/local/lib/python3.8/dist-packages/requests/sessions.py:655 in send
       653│
       654│         # Send the request
     → 655│         r = adapter.send(request, **kwargs)
       656│
       657│         # Total elapsed time of the request (approximately)

   1  /usr/local/lib/python3.8/dist-packages/requests/adapters.py:416 in send
       414│             raise InvalidURL(e, request=request)
       415│
     → 416│         self.cert_verify(conn, request.url, verify, cert)
       417│         url = self.request_url(request, proxies)
       418│         self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies)

  OSError

  Could not find a suitable TLS CA certificate bundle, invalid path: /usr/local/lib/python3.8/dist-packages/certifi/cacert.pem

  at /usr/local/lib/python3.8/dist-packages/requests/adapters.py:227 in cert_verify
      223│             if not cert_loc:
      224│                 cert_loc = extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH)
      225│
      226│             if not cert_loc or not os.path.exists(cert_loc):
    → 227│                 raise IOError("Could not find a suitable TLS CA certificate bundle, "
      228│                               "invalid path: {}".format(cert_loc))
      229│
      230│             conn.cert_reqs = 'CERT_REQUIRED'
      231│

------
executor failed running [/bin/sh -c poetry install -vvv]: exit code: 1
@eoshea-cmt eoshea-cmt added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 2, 2021
@finswimmer
Copy link
Member

Hello @eoshea-cmt,

how did you install poetry? With pip? If so stop doing this. Always install poetry with the official installer or pipx. That's the only way to make sure, that poetry's own dependencies get not updated/deleted.

fin swimmer

@finswimmer finswimmer added the status/waiting-on-response Waiting on response from author label Sep 3, 2021
@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
@mkniewallner mkniewallner removed the status/waiting-on-response Waiting on response from author label Jun 11, 2022
Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

4 participants