← Back to issue list

internal error for "charmcraft revisions"

View original Github issue

Metadata

Project
charmcraft
Number
#459
Type
issue
State
closed
Author
sed-i
Labels
—
Created
Updated
Closed

Current evaluation

Closed with no documented fix, closing comment, or linked PR or commit; no repository change could be reliably tied to the closure.

Resolution: closed stale

Reason: Issue #459 has zero comments, and its closing record identifies no resolving PR, commit, version, or maintainer rationale. With no concrete resolution documented, the closure is classified as stale.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When I query for revisions of my newly uploaded [k8s bundle](https://github.com/canonical/lma-light-bundle), charmcraft fails with an internal error: ```shell > $ charmcraft upload lma-light.zip DEPRECATED: Bases configuration is now required. See https://discourse.charmhub.io/t/4652#heading--dn03 for more information. Revision 3 of 'lma-light' created > $ charmcraft revisions lma-light DEPRECATED: Bases configuration is now required. See https://discourse.charmhub.io/t/4652#heading--dn03 for more information. charmcraft internal error! TypeError: type object argument after ** must be a mapping, not NoneType (full execution logs in ...) 2021-07-21 18:57:28,602 charmcraft.guard ERROR Traceback (most recent call last): File "/snap/charmcraft/513/lib/charmcraft/main.py", line 362, in main dispatcher.run() File "/snap/charmcraft/513/lib/charmcraft/main.py", line 348, in run self.command.run(self.parsed_args) File "/snap/charmcraft/513/lib/charmcraft/commands/store/__init__.py", line 429, in run result = store.list_revisions(parsed_args.name) File "/snap/charmcraft/513/lib/charmcraft/commands/store/store.py", line 213, in list_revisions result = [_build_revision(item) for item in response["revisions"]] File "/snap/charmcraft/513/lib/charmcraft/commands/store/store.py", line 213, in <listcomp> result = [_build_revision(item) for item in response["revisions"]] File "/snap/charmcraft/513/lib/charmcraft/commands/store/store.py", line 69, in _build_revision bases=[Base(**base) for base in item["bases"]], File "/snap/charmcraft/513/lib/charmcraft/commands/store/store.py", line 69, in <listcomp> bases=[Base(**base) for base in item["bases"]], TypeError: type object argument after ** must be a mapping, not NoneType ``` ## attempted charmcraft.yaml variations I tried the following variations for the `charmcraft.yaml` file. ### without bases ```yaml type: bundle parts: bundle: prime: - README.md - LICENSE ``` ### with bases, short form ```yaml type: bundle parts: bundle: prime: - README.md - LICENSE bases: - name: ubuntu channel: "20.04" ``` ### with bases, long form ```yaml type: bundle parts: bundle: prime: - README.md - LICENSE bases: - build-on: - name: "ubuntu" channel: "20.04" run-on: - name: "ubuntu" channel: "20.04" ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale Closed with no documented fix, closing comment, or linked PR or commit; no repository change could be reliably tied to the closure.
stealth/space-bunny-alpha — closed stale Reported a Charmcraft revisions crash on bundles with null bases data; closed without a documented fix, resolving PR, or maintainer explanation.
stealth/space-bunny-alpha — closed resolved Fixed revision listing for bundles without bases in commit 3c3e4c2a, adding Store-layer bases support instead of unpacking a null bases value.
qwen3.6-35b-a3b-mtp-q6 — — Closed without comments. The charmcraft revisions command crashed with a TypeError when bases were null. Issue likely abandoned or resolved upstream.
qwen/qwen3.6-35b-a3b — — Closed. The TypeError crash when querying revisions for bundles with missing bases was fixed by handling None values in the API response parsing.
qwen/qwen3.6-35b-a3b — — Fixed a TypeError in charmcraft revisions caused by null bases entries in bundle metadata. The crash was resolved by adding null checks during revision parsing, allowing the command to successfully list revisions for newly uploaded bundles.
qwen3.6-35b-a3b-mtp-q6 — — Closed without documented resolution. A TypeError in charmcraft revisions occurred when the bases field was None. Zero comments and no linked fixes indicate the issue was abandoned or resolved externally.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1398 internal error if not in a charm repo root charmcraft closed Closed as fixed after an invalid config.yaml was identified as the trigger for Charmcraft's unhelpful NoneType internal error; no fixing PR or commit was cited.
77%
#231 bad error message: Upload failed with status 'rejected'. charmcraft closed Closed as covered by canonical/charmcraft#78, which was intended to expose store rejection reasons; no resolving Charmcraft PR or commit was cited.
73%
#89 internal error when running command with invalid parameters craft-application closed Closed without a documented fix, linked PR, or closing explanation; the sole comment only proposed alternative wording for command errors.
71%
#97 Encoding issues with the metadata output fetch-service closed Closed without a documented fix after CRAFT-3023 was created; no linked PR, commit, or maintainer explanation accompanied the closure.
70%