← Back to issue list

The snapcore/snapcraft docker image fails because it's not setting UTF-8

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1699218
Type
issue
State
closed
Author
~elopio
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged snapcore/snapcraft PR #1370 (commit 778e4e234), adding a Dockerfile with the UTF-8 environment required by Snapcraft 2.31.

Resolution: closed resolved

Reason: The issue was resolved by snapcore/snapcraft PR #1370, merged as commit 778e4e234. It added the Snapcraft Dockerfile and configured the UTF-8 environment needed to prevent Click from aborting under an ASCII locale.

Evaluated by: mr-cal-bot

No scores available.

Issue body

With snapcraft 2.31, our CLI now requires to have UTF-8 set. So the travis jobs out there configured with this image will fail with: snapcraft clean Traceback (most recent call last): File "/usr/bin/snapcraft", line 32, in <module> obj=dict(project=snapcraft.ProjectOptions())) File "/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 675, in main _verify_python3_env() File "/usr/lib/python3/dist-packages/click/_unicodefun.py", line 119, in _verify_python3_env 'mitigation steps.' + extra) RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Either run this under Python 2 or consult http://click.pocoo.org/python3/ for mitigation steps. This system supports the C.UTF-8 locale which is recommended. You might be able to resolve your issue by exporting the following environment variables: export LC_ALL=C.UTF-8 export LANG=C.UTF-8

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged snapcore/snapcraft PR #1370 (commit 778e4e234), adding a Dockerfile with the UTF-8 environment required by Snapcraft 2.31.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR snapcore/snapcraft#1370 (778e4e234), adding the Snapcraft Dockerfile with the UTF-8 environment setting required by Snapcraft 2.31.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #1310 (commit 45acbf0be), which configured the Docker tests to use the C.UTF-8 locale.
qwen/qwen3.6-35b-a3b — — Closed. The snapcore/snapcraft Docker image was updated to set LC_ALL=C.UTF-8 and LANG=C.UTF-8, fixing the Click locale error that broke snapcraft 2.31+ in Travis CI environments.
qwen/qwen3.6-35b-a3b — — Abandoned due to inactivity. The UTF-8 locale requirement was subsequently fixed in updated snapcraft Docker images by explicitly setting LC_ALL and LANG to C.UTF-8.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The snapcore/snapcraft Docker image locale error was addressed by exporting LC_ALL and LANG as C.UTF-8, but the issue was abandoned.
qwen3.6-35b-a3b-mtp-q6 — — Closed without code changes. The Docker image locale failure was resolved by applying the suggested environment variable exports or abandoned, as no repository modifications were implemented.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#1370 (confidence 100%)

    Merged PR implemented in commit 778e4e234 and was cited in the issue's resolution.

Related issues

Issue Project State Summary Similarity
#1628457 snapcraft fails on s390x with utf8 error snapcraft (launchpad) closed Snapcraft's s390x UTF-8/surrogate failure was fixed by merged PR snapcore/snapcraft#838, adding encoding-aware file handling in pluginhandler (commit 01848ee71).
74%