unicode encoding error in windows
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Beginne damit, den Fehler der paketierten CLI in einer MinGW- oder GitBash-Umgebung zu reproduzieren und localstack/cli/localstack.py im Bereich von print_version zu untersuchen, wo der Traceback die Rich-Ausgabe erreicht. Vergleiche dieses Verhalten mit PowerShell und verifiziere, dass die CLI ohne den cp1252 UnicodeEncodeError erfolgreich startet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
when running the packaged CLI for windows, i get the following errors, which blocks the startup in the cockpit app https://github.com/localstack/localstack-desktop (where the same error is thrown when executing using spawn in a node process). i can reproduce it in a MinGW environment like GitBash
thomas@DESKTOP-HDNUHFQ MINGW64 ~
$ ./AppData/Local/Programs/localstack-cockpit/resources/vendor/win32/localstack-packaged-cli/localstack.exe start
Traceback (most recent call last):
File "main.py", line 6, in <module>
File "localstack\cli\main.py", line 6, in main
File "localstack\cli\plugin.py", line 15, in __call__
File "click\core.py", line 1128, in __call__
File "click\core.py", line 1053, in main
File "click\core.py", line 1659, in invoke
File "click\core.py", line 1395, in invoke
File "click\core.py", line 754, in invoke
File "localstack\cli\localstack.py", line 122, in cmd_start
File "localstack\cli\localstack.py", line 435, in print_version
File "rich\console.py", line 1637, in print
File "rich\console.py", line 837, in __exit__
File "rich\console.py", line 795, in _exit_buffer
File "rich\console.py", line 1927, in _check_buffer
File "encodings\cp1252.py", line 19, in encode
UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f4bb' in position 1: character maps to <undefined>
*** You may need to add PYTHONIOENCODING=utf-8 to your environment ***
[13272] Failed to execute script 'main' due to unhandled exception!
__ _______ __ __
/ / ____ _________ _/ / ___// /_____ ______/ /__
/ / / __ \/ ___/ __ `/ /\__ \/ __/ __ `/ ___/ //_/
/ /___/ /_/ / /__/ /_/ / /___/ / /_/ /_/ / /__/ ,<
/_____/\____/\___/\__,_/_//____/\__/\__,_/\___/_/|_|
some observations:
- it works using powershell
- cp1252 refers to windows encoding: https://en.wikipedia.org/wiki/Windows-1252
- this is not related to the locale configuration
thomas@DESKTOP-HDNUHFQ MINGW64 ~
$ locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_ALL=en_US.utf8
- Vorherrschende Sprache
- Makefile
- Sterne
- 27
- Forks
- 9
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Ähnliche Issues
-
triage
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
app bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
-
Broadcast Documentation Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
kovidgoyal/kitty#10516 ·