← Back to issue list

snapcraft register doesn't support non-latin characters

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1809584
Type
issue
State
open
Author
~kornelski
Labels
Created
Updated
Closed

Current evaluation

snapcraft register crashes with UnicodeEncodeError on latin-1 terminals due to non-latin chars in click.confirm prompt. Reported against v2.43.1 (2018); code path since rewritten to craft-cli emit/input, no maintainer interaction in 7.7 years.

Suggested action: close stale

Reason: The traceback points to snapcraft 2.43.1's click.confirm → click.echo path, which has been entirely replaced by craft-cli's emit.progress and confirm_with_user (snapcraft/utils.py:149) using Python's built-in input(). The affected version is no longer supported, the specific bug mechanism no longer exists in the current codebase, and there has been zero maintainer interaction in 7.7 years.

Impact: 30 Quick Win: 22.5 Staleness: 95 Complexity: 25 Confidence: 72 Support Request: 10

Issue body

Using this file: https://github.com/kornelski/pngquant/blob/8b686cd3c32704f4dbe0e0904f1ec87d60d6e64e/snapcraft.yaml and running snapcraft register pngquant I get: Traceback (most recent call last): File "/usr/bin/snapcraft", line 9, in <module> load_entry_point('snapcraft==2.43.1', 'console_scripts', 'snapcraft')() 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 696, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/cli/store.py", line 115, in register if click.confirm(_MESSAGE_REGISTER_CONFIRM.format(snap_name)): File "/usr/lib/python3/dist-packages/click/termui.py", line 138, in confirm echo(prompt, nl=False, err=err) File "/usr/lib/python3/dist-packages/click/utils.py", line 259, in echo file.write(message) UnicodeEncodeError: 'latin-1' codec can't encode character '\u2018' in position 255: ordinal not in range(256)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 30
Quick Win: 22.5
Staleness: 95
Complexity: 25
Confidence: 72
Support Request: 10
close stale snapcraft register crashes with UnicodeEncodeError on latin-1 terminals due to non-latin chars in click.confirm prompt. Reported against v2.43.1 (2018); code path since rewritten to craft-cli emit/input, no maintainer interaction in 7.7 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 25
Confidence: 90
Support Request: 5
close stale Reports a UnicodeEncodeError when running snapcraft register due to non-latin characters in CLI prompts. Issue is 7.5 years old with no maintainer response or labels.
qwen/qwen3.6-35b-a3b
Staleness: 100
Complexity: 20
Confidence: 95
Support Request: 0
close stale snapcraft register fails with UnicodeEncodeError when snap name contains non-latin characters. Issue is 7+ years old with no activity or maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 30
Confidence: 80
Support Request: 10
close stale Reports a UnicodeEncodeError when registering a snap with non-Latin characters using snapcraft 2.43.1. The stack trace points to the click library's terminal encoding limitation. No maintainer response in over 7 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 25
Confidence: 85
Support Request: 5
close stale Unhandled UnicodeEncodeError in snapcraft register when using non-latin characters. Issue is 7+ years old, unlabelled, and lacks maintainer response. The affected snapcraft version is obsolete.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.