question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

poetry install: `--no-ansi` uses non-ascii character ( `•` - `\u2022` - `BULLET`)

See original GitHub issue
  • 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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
abncommented, 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.

1reaction
NovemberOscarcommented, Oct 6, 2020

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Commands | Documentation | Poetry - Python dependency ...
Commands You've already learned how to use the command-line interface to do some things. This chapter documents all the available commands.
Read more >
How to replace unicode characters in string with something ...
Encode the string to ASCII and replace all the utf-8 characters with '?'. str1 = str1.encode("ascii", "replace"). Decode the byte stream to string....
Read more >
https://huggingface.co/sentence-transformers/avera...
"unable", "attempts", "refused", "applications", "challenge", "philosophy", "stock", "powerful", "enemy", "finish", "standards", "crown", "needs", ...
Read more >
Incident Response - Hybrid Analysis
Not all malicious and suspicious indicators are displayed. ... Uses a User Agent typical for browsers, although no browser was ever launched.
Read more >
Untitled
Does it say music is haram in the quran, Mk sound 950 speaker system, Non ... No parabens sun cream, Corni qlaza mp3...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found