poetry: Poetry 1.3 dies when run with a TTY reporting size 0/0
- Poetry version: 1.3.1
- Python version: 3.10
- OS version and name: Ubuntu 20.04
- pyproject.toml: pyproject.toml
- I am on the latest stable Poetry version, installed using a recommended method.
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have consulted the FAQ and blog for any relevant entries or release notes.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.
Issue
Running as part of a circle ci workflow. Steps below. The command poetry install
identifies the Package Operations
and then exits with code 1. (output below)
SSH into the box and running poetry install
produces the normal expected behavior.
workflow steps
...
pyenv global 3.10.2
pip install poetry==1.2.2
export PATH="/home/circleci/.local/bin:$PATH"
poetry install -vvv
...
###Poetry Install Step
#!/bin/bash -eo pipefail
poetry install -vvv
Creating virtualenv fastapi-template-repository-3aSsmiER-py3.10 in /home/circleci/.cache/pypoetry/virtualenvs
Using virtualenv: /home/circleci/.cache/pypoetry/virtualenvs/fastapi-template-repository-3aSsmiER-py3.10
Installing dependencies from lock file
Finding the necessary packages for the current system
Package operations: 71 installs, 1 update, 0 removals
Exited with code exit status 1
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 48
- Comments: 39 (9 by maintainers)
Commits related to this issue
- work around poetry bug python-poetry/poetry#7184 — committed to gtmanfred/teststack by gtmanfred 2 years ago
- Create a network for a project so that internal dns works work around poetry bug python-poetry/poetry#7184 fix Flask-Caching whatever for tests — committed to gtmanfred/teststack by gtmanfred 2 years ago
- ci: Fix the failing run-lint step Fix the failing run-lint test by switching to Debian Bookworm for this step, and installing Poetry 1.2.2 from the official repos. This way, we circumvent a bug [1] i... — committed to freedomofpress/dangerzone by apyrgio 2 years ago
- ci: Fix convert-test-docs step Fix the failing convert-test-docs step, by pinning Poetry to version 1.2.2. This way, we avoid a bug in Poetry 1.3 [1], which was recently released on PyPI. [1]: https... — committed to freedomofpress/dangerzone by apyrgio 2 years ago
- ci: Fix the failing run-lint step Fix the failing run-lint test by switching to Debian Bookworm for this step, and installing Poetry 1.2.2 from the official repos. This way, we circumvent a bug [1] i... — committed to freedomofpress/dangerzone by apyrgio 2 years ago
- ci: Fix convert-test-docs step Fix the failing convert-test-docs step, by pinning Poetry to version 1.2.2. This way, we avoid a bug in Poetry 1.3 [1], which was recently released on PyPI. [1]: https... — committed to freedomofpress/dangerzone by apyrgio 2 years ago
- fix: use —no-ansi to fix poetry 1.3 issues Reference thread: https://github.com/python-poetry/poetry/issues/7184 — committed to immuni-app/immuni-app-ios by valerio-castelli 2 years ago
- fix: use —no-ansi to fix poetry 1.3 issues Reference thread: https://github.com/python-poetry/poetry/issues/7184 — committed to immuni-app/immuni-ci-scheduler by valerio-castelli 2 years ago
- fix: use —no-ansi to fix poetry 1.3 issues Reference thread: https://github.com/python-poetry/poetry/issues/7184 — committed to immuni-app/immuni-app-android by valerio-castelli 2 years ago
- Flip to Python 3.11 to work around https://github.com/python-poetry/poetry/issues/7184 — committed to cjw296/carthorse by cjw296 2 years ago
- Fix for broken Poetry 1.3 on CircleCI https://github.com/python-poetry/poetry/issues/7184 — committed to OceanSprint/tesh by zupo 2 years ago
- Fix for broken Poetry 1.3 on CircleCI https://github.com/python-poetry/poetry/issues/7184 — committed to OceanSprint/tesh by zupo 2 years ago
- chore(ci): fix poetry install crash via --no-ansi https://github.com/python-poetry/poetry/issues/7184 — committed to cole/aiosmtplib by cole a year ago
- may be https://github.com/python-poetry/poetry/issues/7184 — committed to bacalhau-project/bacalhau by enricorotundo a year ago
- feat(gcloud): pin poetry in gcf build >1.2.2 is currently broken in CircleCI pending https://github.com/python-poetry/poetry/issues/7184 — committed to talkiq/circleci-orbs by TheKevJames a year ago
- Allow --no-ansi option to be used during Poetry install As I wanted to use the most recent version of CircleCI's official Python 3.8.x executor in order to utilize the latest version of Poetry, I ran... — committed to rackerlabs/rsspca by szilveszter a year ago
- Allow --no-ansi option to be used during Poetry install As I wanted to use the most recent version of CircleCI's official Python 3.8.x executor in order to utilize the latest version of Poetry (1.3.1... — committed to rackerlabs/rsspca by szilveszter a year ago
- Merge pull request #36 from rackerlabs/szilveszter/poetry-install-no-ansi [semver:patch] As I wanted to use the most recent version of CircleCI's official Python 3.8.x executor in order to utilize th... — committed to rackerlabs/rsspca by szilveszter a year ago
- Rolling back CircleCI image due to https://github.com/python-poetry/poetry/issues/7184 — committed to natsunlee/flowmancer by natsunlee a year ago
- use no terminal in CircleCI tests for poetry see https://github.com/python-poetry/poetry/issues/7184 for details of the issue. — committed to openstax/corgi by therealmarv a year ago
FYI a workaround is to run with
--no-ansi
as I stumbled upon this error and then while debugging used that option to clear up some of the output and things ran succesfully.--no-ansi
worked for me too.I’m testing a github action workflow and the poetry installation failed when this flag is not passed in. Surprisingly, it worked fine in github CI, but failed when testing this workflow locally using act.
After hours of debugging
poetry install --no-ansi
✅--no-ansi
solved our issue.For current status, we’ve got a proposed fix here from me that won’t get accepted as per @neersighted 's comment and a better fix here from the cleo maintainer @Secrus , that unfortunately doesn’t yet solve the problem. As I understand, we’re waiting on @Secrus to fix and then merge&release that PR.
Until then, all versions of Poetry v1.3+ on CircleCI and Buildkite (maybe others?) are broken for any commands not using the
--no-ansi
flag.Just confirming that I also faced this bug and that using
poetry install --no-ansi
did the trick.@rlgomes you’ve fixed our work deployment pipeline! Thanks.
--no-ansi
makespoetry install
work as intended, on thecimg/python:3.8
docker image at least.A user on Discord has been debugging this as well, it appears to only happen in CircleCI when using the same base image. I’ve asked that user to post the debugging they’ve done here, but the basic thing we know right now is that Poetry is receiving a SIGINT right after printing the installer summary (determined via an strace).
Had the same problem this morning with the latest
poetry
. Pinning back to1.2.2
during the build solves the issue.@iainelder it was closed because the PR with the solution was merged. It will be visible after Cleo gets a new release (it’s close, probably sometime in mid-July).
We’ve been experiencing this issue with poetry install and poetry update (and self update) on circleci. I just tested out a self update to use Poetry version 1.4, and it seems the issue still exists. (The release notes didn’t indicate otherwise, but in case that confirmation is helpful)
FWIW, I ran into this issue when using
ray
which runs some setup commands. The resulting command looked like the following:When executed by
ray
, it would fail. If I executed the same thing from a shell on the head node it would be successful.--no-ansi
resolved the issue.–no-ansi to the rescue, worked for us
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨
I also see this happen in python versions 3.8 to 3.10, but it doesn’t happen on 3.11 (both
cimg/python:3.x
andpython:3.x
). It also succeeds if you SSH in and manually runpoetry install
. I’m also unable to repro with Docker. Overall, very frustrating to debug 😢