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 exits with exit code 1 when run in a docker container #3412

Closed
3 tasks done
achow101 opened this issue Nov 25, 2020 · 5 comments · Fixed by #4038
Closed
3 tasks done

poetry install exits with exit code 1 when run in a docker container #3412

achow101 opened this issue Nov 25, 2020 · 5 comments · Fixed by #4038
Labels
kind/bug Something isn't working as expected

Comments

@achow101
Copy link

Issue

When trying to install the dependencies with poetry for my project in a docker container, poetry just exits with no errors or warning, just an exit code of 1.

The Dockerfile is https://github.com/bitcoin-core/HWI/blob/def565b5ac5d98b5fcc453328fc9a20207c6e00a/contrib/build.Dockerfile and the script being run is https://github.com/bitcoin-core/HWI/blob/def565b5ac5d98b5fcc453328fc9a20207c6e00a/contrib/build_bin.sh. It specifically errors on the line poetry install -E qt. Changing this command to include -vvv does not effect the output.

The output is

+ poetry install -E qt
Creating virtualenv hwi-G-6EQZNy-py3.6 in /root/.cache/pypoetry/virtualenvs
Installing dependencies from lock file

Package operations: 28 installs, 0 updates, 0 removals

This previously worked when poetry 1.0.10 was used and it seems like 1.1.0 is the version where this stopped working.

If I run this on my host, also with 1.1.4, there are no issues. It seems to only be in this container. The script doesn't seem to make a difference; I can have a shell in the container, do poetry install manually, and it still fails in the same way.

@achow101 achow101 added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 25, 2020
@brandon-leapyear
Copy link

brandon-leapyear commented Jan 6, 2021

This is an old work account. Please reference @brandonchinn178 for all future communication


I got the same thing, and bisecting my changes, I noticed that it happens when LANG=en_US.UTF-8 is set, but the Docker image I'm using doesn't have that locale configured. I think this is a bug, poetry should either be independent of a misconfigured LANG setting, or show better logs

@achow101
Copy link
Author

I was able to work around this by adding

ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV LANGUAGE=C.UTF-8

to my Dockerfile.

But I'm going to leave this issue open because I think it's a bug that poetry is existing like this when no locale is set.


A way to replicate this outside of docker is to temporarily unset the locale, e.g.:

env LC_ALL= LANG= LANGUAGE= poetry install

@jtmoon79
Copy link

jtmoon79 commented Apr 1, 2021

If poetry must have LOCALE, then it must inform the user why it is failing, i.e. it should raise some useful error.

@brandon-leapyear
Copy link

brandon-leapyear commented May 3, 2021

This is an old work account. Please reference @brandonchinn178 for all future communication


Found the issue:

" <fg=blue;options=bold>•</> {message}: <fg=blue>Pending...</>".format(

LANG= python3.6 -c 'print("•")'

fails on python 3.6, but not 3.7+:
https://docs.python.org/3/whatsnew/3.7.html

Avoiding the use of ASCII as a default text encoding

neersighted pushed a commit that referenced this issue Nov 14, 2021
1nF0rmed pushed a commit to 1nF0rmed/poetry that referenced this issue Nov 15, 2021
edvardm pushed a commit to edvardm/poetry that referenced this issue Nov 24, 2021
@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
gslin added a commit to hasname/feedgen that referenced this issue Dec 21, 2022
Not sure if this bug is in line with:
* python-poetry/poetry#3412
enricorotundo added a commit to bacalhau-project/bacalhau that referenced this issue Jan 11, 2023
Copy link

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 28, 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

Successfully merging a pull request may close this issue.

4 participants