← Back to issue list

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

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1607015
Type
issue
State
closed
Author
~popey
Labels
eco-team
Created
Updated
Closed

Current evaluation

Resolved by the parts rework in snapcraft/snapcraft#705: slash-containing part names became deprecated aliases, so the reported snap built with a warning instead of failing.

Resolution: closed resolved

Reason: A maintainer confirmed the example built successfully with a deprecation message after snapcraft/snapcraft#705 enabled exported remote-part aliases. Commit f83720ad6 later removed the BIG SOLIDUS workaround.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Trying to build in an lxc container using "snapcraft cleanbuild" and it barfs with:- Setting up x11proto-composite-dev (1:0.4.2-2) ... Setting up libxcomposite-dev (1:0.4.4-1) ... Setting up x11proto-damage-dev (1:1.2.1-2) ... Setting up libxdamage-dev:amd64 (1:1.1.4-2) ... Setting up libxml2-utils (2.9.3+dfsg1-1ubuntu0.1) ... Setting up libgtk2.0-dev (2.24.30-1ubuntu1) ... Processing triggers for libc-bin (2.23-0ubuntu3) ... Processing triggers for systemd (229-4ubuntu7) ... Processing triggers for ureadahead (0.100.0-19) ... 'ascii' codec can't encode character '\u29f8' in position 19: ordinal not in range(128) Command '['lxc', 'exec', 'snapcraft-painfully-epigrammatic-jonathon', '--', 'snapcraft', 'snap', '--output', 'webtorrent_0.9.0_amd64.snap']' returned non-zero exit status 1 Here's the yaml, which builds fine outside lxc. ----------------------------------------------------------------- name: webtorrent version: 0.9.0 summary: Streaming torrent client for OS X, Windows, and Linux description: | confinement: devmode apps: webtorrent: command: desktop-launch $SNAP/bin/webtorrent-desktop plugs: [network, network-bind, unity7, X11, opengl, pulseaudio] parts: webtorrent: after: [desktop/gtk2] source: https://github.com/feross/webtorrent-desktop.git source-tag: v0.9.0 plugin: nodejs stage-packages: - gconf-service - gconf2 - git - gvfs-bin - libasound2 - libcap2 - libgcrypt20 - libgtk2.0-0 - libnotify4 - libnss3 - libudev1 - libxtst6 - python - xdg-utils - unity-gtk2-module stage: [-usr/share/pkgconfig/shared-mime-info.pc] snap: [-usr/share/pkgconfig/shared-mime-info.pc] ----------------------------------------------------------------- timothy on irc suggested we should fix it like he did in snapd:- http://github.com/snapcore/snapd/pull/1468/commits/b66d3ea328ee42d3d4f56ed9736c315833dee67d

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Resolved by the parts rework in snapcraft/snapcraft#705: slash-containing part names became deprecated aliases, so the reported snap built with a warning instead of failing.
stealth/space-bunny-alpha — closed resolved Resolved by the parts rework: commit f83720ad6 (#2330) removed the BIG SOLIDUS workaround, and the reported example built with a deprecation warning.
stealth/space-bunny-alpha — closed resolved Resolved by the parts rework: the BIG SOLIDUS workaround was removed in commit f83720ad6 (#2330), and the reported example built with a deprecation warning.
stealth/space-bunny-alpha — closed stale Snapcraft's LXC build encoding failure was closed without a recorded fix after 3,424 days of inactivity; snapd PR #1468 was cited only as a possible remedy.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The reported ASCII encoding error during LXC builds was likely addressed by the referenced snapd fix, but the issue remains abandoned.
qwen/qwen3.6-35b-a3b — — Closed as abandoned. The snapcraft cleanbuild ASCII encoding error was not addressed, despite a suggested fix from snapd PR #1468.
qwen/qwen3.6-35b-a3b — — Fixed by addressing the ASCII encoding error in snapcraft cleanbuild. The resolution adopted the referenced snapd commit to properly handle non-ASCII characters, preventing the UnicodeEncodeError.
qwen3.6-35b-a3b-mtp-q6 — — Closed after applying a Unicode encoding fix to resolve the ASCII codec error during snapcraft cleanbuild. The issue was fixed by implementing proper UTF-8 handling in the build process, matching the referenced snapd patch.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft/snapcraft#705 (confidence 97%)

    Reworked remote-part exposure and deprecated solidus-containing part names.

  • Related To: snapcraft/snapcraft#2330 (confidence 90%)

    Commit f83720ad6 removed the BIG SOLIDUS workaround.

  • Related To: snapd#1468 (confidence 75%)

    The report referenced its encoding fix as prior art.

Related issues

Issue Project State Summary Similarity
#1649181 snapcraft search: 'ascii' codec can't encode character '\xae' in position 40: ordinal not in range(128) snapcraft (launchpad) closed Reports an ASCII encoding error during snapcraft search on Ubuntu classic. Reporter fixed a separate build issue but the search error persisted. Closed as stale by maintainer.
72%