-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Non UTF-8 encoding in terminal breaks poetry commands #8603
Comments
looks the same as #1427, #3078, #3672 - which mostly seem to claim that you should live in an environment that does support utf-8. not sure I buy that. IMO it would be fine to remove the bullets from You could submit a merge request trying it, if you want to find out. |
Thanks for finding those. I just facepalm myself a bit because I forgot searching for already closed issues... sorry for that. Nevertheless, if the requirement is to have a working UTF-8 environment, then I would at least suspect a message to tell me to do so. Or something similar. In any case, I think this is not specified well enough. And at least that should be in the FAQs. Otherwise nobody will easily find that.
Don't get me wrong, but I don't want to take the time to maybe find out that my PR will be simply closed because of "Won't do" 😉 |
I understand; but I don't have the power to tell you that it will or won't I would guess that it's not a very hard search-replace in the codebase - ie it shouldn't take very much time to try it. But that's easy to say from the perspective of someone who has no intention of doing it themselves. |
Fixed in #8608 |
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. |
Linux raspberrypi 6.1.0-rpi4-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.54-1+rpt2 (2023-10-05) aarch64 GNU/Linux
)-vvv
option) and have included the output below.Issue
(Maybe similar issue: #6784)
Hi 😄
I was developing a project for a Raspberry Pi for with a recent Raspberry Pi OS (installed last week - see above). On my development machine (Ubuntu 20.04 LTS) everything worked fine, I could use poetry to add and remove dependencies etc.
poetry install
did work too.However, once I migrated it to the Raspberry Pi, I couldn't do
poetry install
and it silently exited without installing anything. Because the default poetry installation coming from the apt sources is too old (v1.3.2), I used a new virtualenv to get the newest Poetry (v1.6.1).That seems to be working.
However, when I now cd into my project and do
poetry install -vvv
, the output is just:Nothing happens, but poetry errors out with exit-code 1.
When I manually attempt to add a dependency again, e.g.
poetry add click -vvv
, I finally get a traceback:So something encoding related. And as suspected, in contrast to a standard Ubuntu where the terminal encoding is "utf-8", the encoding on a Raspberry Pi terminal (or SSH session) is:
I tried to work around this issue successfully by using
export PYTHONIOENCODING=utf-8
The output is a bit broken (the fancy progress char animations don't work exactly like they should), but at least it installs stuff again.
Wild guessing from the traceback I would assume that the cleo package has no encoding fallback, or poetry does not use cleo with an explicit encoding fallback specified (or some non-strict encoding parameter).
I also tried this with a clean new poetry project after
poetry init
and the same effect appears on my Raspberry Pi. So I highly doubt this is pyproject.toml related (but if you still need a pyproject.toml example please feel free to ask for it 😁).So to clarify, there are 2 bugs here:
poetry install
, the encoding bug is silently swallowed and no traceback is visible. At least there is a non-zero return code.poetry add
andpoetry install
) when the output terminal has a non-UTF8 encoding (there might be other encodings that work different from UTF-8, but just for the sake of simplicity).The text was updated successfully, but these errors were encountered: