← Back to issue list

Numerical value for 'source-tag' key causes confusing error

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1612373
Type
issue
State
open
Author
~wesley-wiedenmeier
Labels
yaml
Created
Updated
Closed

Current evaluation

Unquoted numeric source-tag (e.g., 2.14) in snapcraft.yaml caused a confusing 'Can't convert float to str' error. No comments, no activity for ~7.7 years. The snapcraft.internal.sources code path no longer exists after the 2.x rewrite.

Suggested action: close stale

Reason: The issue has had zero comments and no activity for ~7.7 years (last activity 2814 days ago), and it targets snapcraft.internal.sources.Base, which no longer exists — the current repo layout shows the rewritten 2.x structure (snapcraft/parts, snapcraft/models) with no internal/ directory, so the original error path is gone. The only uncertainty is whether modern pydantic YAML validation still produces a confusing error for numeric tags, which I could not verify due to no pinned SHA for the repo.

Impact: 25 Quick Win: 18.75 Staleness: 90 Complexity: 25 Confidence: 70 Support Request: 15

Issue body

Many projects on github have numerical tags that represent a release version. The most obvious way to pull a specific revision of something is to use something like 'source-tag: 2.14'. However, this fails with the message: 'Can't convert 'float' object to str implicitly' The same snapcraft configuration file works as expected if the tag is enclosed in quotes, but it would be nice to not require the user to put quotes around the tag. It should work perfectly fine to add a call to str() in snapcraft.internal.sources.Base.__init__ Also, if this is something that won't be fixed, then either the error should be caught and a more helpful error message should be displayed, or a stacktrace should be displayed to make it easier to track the issue down. There is an example snapcraft configuration file attached that demonstrates the bug.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 25
Quick Win: 18.75
Staleness: 90
Complexity: 25
Confidence: 70
Support Request: 15
close stale Unquoted numeric source-tag (e.g., 2.14) in snapcraft.yaml caused a confusing 'Can't convert float to str' error. No comments, no activity for ~7.7 years. The snapcraft.internal.sources code path no longer exists after the 2.x rewrite.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 5
close stale Numerical values in the source-tag YAML key cause a Python type conversion error. Issue is nearly 10 years old with no maintainer response or activity for over 7 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 25
Confidence: 90
Support Request: 10
close stale Numerical values in the source-tag YAML key cause a Python type conversion error. The report is over 9 years old with nearly 8 years of inactivity and no maintainer engagement.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 10
Confidence: 70
Support Request: 5
close stale Unquoted numerical values in the source-tag config key trigger a confusing Python float-to-str conversion error. The issue has seen no maintainer interaction or resolution in nearly a decade.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 10
close stale Numerical source-tag values in snapcraft YAML configs trigger a cryptic Python type error. The report remains unaddressed with zero comments and years of inactivity, currently needing triage or a fix.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.