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: --no-ansi uses non-ascii character ( - \u2022 - BULLET) #3078

Closed
3 tasks done
rscarrera27 opened this issue Oct 5, 2020 · 7 comments
Closed
3 tasks done
Labels
status/duplicate Duplicate issues

Comments

@rscarrera27
Copy link

rscarrera27 commented Oct 5, 2020

  • 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).

  • OS version and name: Ubuntu 16.04 on Docker

  • Poetry version: 1.1.0

  • Link of a Gist with the contents of your pyproject.toml file: Unable to expose due to company's security policy

Issue

I got an this message from docker

Step 11/15 : RUN poetry config virtualenvs.create false   && poetry install --no-interaction --no-ansi
 ---> Running in 3956f57f28cd
Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file

Package operations: 80 installs, 1 update, 0 removals


  UnicodeEncodeError

  'ascii' codec can't encode character '\u2022' in position 2: ordinal not in range(128)

  at ~/.pyenv/versions/3.6.2/lib/python3.6/site-packages/clikit/io/output_stream/stream_output_stream.py:24 in write

  UnicodeEncodeError

  'ascii' codec can't encode character '\u2022' in position 2: ordinal not in range(128)

  at ~/.pyenv/versions/3.6.2/lib/python3.6/site-packages/clikit/io/output_stream/stream_output_stream.py:24 in write
The command '/bin/sh -c poetry config virtualenvs.create false   && poetry install --no-interaction --no-ansi' returned a non-zero code: 1

then I ran same command on macbook (iTerm2) and I could see a BULLET(\u2022) character. I searched about BULLET character on google and it is not an ascii character.

Printing non ascii character BULLET in --no-ansi mode seems to be fixed.

🕙 15:41:15 
❯ poetry install --no-interaction --no-ansi                                                                 
Installing dependencies from lock file

Package operations: 20 installs, 0 updates, 0 removals

  • Installing asynctest (0.13.0): Pending...  • Installing coverage-badge (1.0.1): Pending...  • Installing emoji (0.5.4): Pending...  • Installing faker (2.0.5): Pending...  • Installing fastpbkdf2 (0.2): Pending...  • Installing freezegun (0.3.15): Pending...  • Installing <secret> (0.0.2): Pending...  • Installing <secret> (0.1.5): Pending...  • Installing <secret> (0.3.2): Pending...  • I
@rscarrera27 rscarrera27 added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 5, 2020
@Fuzi0n
Copy link

Fuzi0n commented Oct 5, 2020

I confirm this issue with

`Installing dependencies from lock file

Package operations: 120 installs, 0 updates, 0 removals

UnicodeEncodeError

'ascii' codec can't encode character '\u2022' in position 2: ordinal not in range(128)

at ~/python/lib/python3.6/site-packages/clikit/io/output_stream/stream_output_stream.py:24 in write`

@abn
Copy link
Member

abn commented Oct 5, 2020

@NovemberOscar have you seen #1427 (comment)? I am curious if the root cause is the same here.

@rscarrera27
Copy link
Author

rscarrera27 commented Oct 5, 2020

Oh. I never seen it before when I searched issue 🤔 It seems very similar to my one (docker, encoding, clikit...) I will check again soon :)

@rscarrera27
Copy link
Author

@abn Thanks for letting me know! after I fixed container locale, poetry install succeed.

But as you know, most people don't specify locale in Dockerfile. Using BULLET is likely to cause problems for many people using poetry on docker(or any ascii only environment), so I suggest going back to dash symbol as it used to be.

@abn
Copy link
Member

abn commented Oct 6, 2020

This is not really a poetry specific issue. And we use non ascii characters elsewhere too.

https://click.palletsprojects.com/en/5.x/python3/#python-3-surrogate-handling

The issue here is the Ubuntu container. Additionally, this is a non issue for python 3.7.

@abn abn added status/duplicate Duplicate issues and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 6, 2020
@abn abn closed this as completed Oct 6, 2020
slhck added a commit to Telecommunication-Telemedia-Assessment/bitstream_mode3_p1204_3 that referenced this issue Dec 8, 2020
Fixes a bug with Poetry/Python 3.6, related to:

- python-poetry/poetry#1427 (comment)
- python-poetry/poetry#3078
slhck added a commit to Telecommunication-Telemedia-Assessment/bitstream_mode3_p1204_3 that referenced this issue Dec 10, 2020
Fixes a bug with Poetry/Python 3.6, related to:

- python-poetry/poetry#1427 (comment)
- python-poetry/poetry#3078
@valeriiisotnyk
Copy link

Hello, if you're encountering such an issue, here are a few steps you might want to try.
sudo locale-gen en_US.UTF-8
Then
sudo update-locale LANG=en_US.UTF-8

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 Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

4 participants