← Back to issue list

[copy] TypeError: string indices must be integers

View original Github issue

Metadata

Project
snapcraft
Number
#41
Type
issue
State
closed
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Copy plugin scalar `files: .` handling was fixed by merged PR #108, which added glob support.

Resolution: closed resolved

Reason: Merged PR canonical/snapcraft#108 fixed the copy plugin crash through commit 8294647d6 (merged as 639d60c41), adding glob support for inputs such as `files: .`.

Evaluated by: mr-cal-bot

No scores available.

Issue body

I'm sure I'm using it wrong, bug snapcraft shouldn't crash: name: bwm-ng version: 0.6-3.2 vendor: Daniel Holbach <email address hidden> summary: small and simple console-based bandwidth monitor description: Bandwidth Monitor NG is a small and simple console-based live network and disk io bandwidth monitor for Linux, BSD, Solaris, Mac OS X and others icon: ubuntu.png binaries: bwm-ng: exec: usr/bin/bwm-ng parts: bwm-ng: type: copy files: . stage-packages: [bwm-ng] aniel@daydream:~/dev/apps/bwm-ng.snap$ snapcraft build Skipping pull bwm-ng (already ran) Building bwm-ng Traceback (most recent call last): File "/usr/bin/snapcraft", line 33, in <module> snapcraft.main.main() File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 80, in main args.func(args) File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 331, in cmd if not getattr(part, cmd)(force=force): File "/usr/lib/python3/dist-packages/snapcraft/plugin.py", line 208, in build if not getattr(self.code, 'build')(): File "/usr/lib/python3/dist-packages/snapcraft/plugins/copy.py", line 31, in build dst = self.options.files[src] TypeError: string indices must be integers daniel@daydream:~/dev/apps/bwm-ng.snap$ Launchpad Details: [#LP1499249](https://bugs.launchpad.net/bugs/1499249) Daniel Holbach - 2015-09-24 06:15:26 -0300

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Copy plugin scalar `files: .` handling was fixed by merged PR #108, which added glob support.
stealth/space-bunny-alpha — closed resolved The scalar files: . copy-plugin crash was fixed by merged canonical/snapcraft#108, which added glob support and matched the maintainer’s closing fix note.
stealth/space-bunny-alpha — closed resolved Copy-plugin TypeError was addressed by merged copy-plugin work in canonical/snapcraft#108 (8294647d6); the maintainer said schema and exception handling should fix the crash.
stealth/space-bunny-alpha — closed resolved Resolved by copy-plugin schema validation and exception-handling improvements, preventing the invalid files configuration from causing a raw TypeError.
qwen/qwen3.6-35b-a3b — — Fixed by schema validation and exception handling improvements to the copy plugin. The TypeError crash from invalid string indexing in the files configuration was resolved.
qwen/qwen3.6-35b-a3b — — Fixed by schema validation and exception handling improvements in the copy plugin. The TypeError from incorrect string indexing during file processing was resolved via updated plugin schema handling.
qwen/qwen3.6-35b-a3b — — Resolved by schema validation and exception handling improvements in the plugin. Maintainer sergiusens closed the issue, confirming the TypeError crash in the copy plugin was fixed.
qwen3.6-35b-a3b-mtp-q6 — — The snapcraft copy plugin crashed with a TypeError during file path processing. Fixed by schema validation and improved exception handling in the plugin system, preventing the crash and enforcing correct configuration formats.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#108 (confidence 99%)

    The merged copy-plugin glob support directly addressed the reported scalar `files` failure.

Related issues

Issue Project State Summary Similarity
#1499249 [copy] TypeError: string indices must be integers snapcraft (launchpad) closed Moved to canonical/snapcraft#41; scalar copy-plugin files handling was fixed by merged PR canonical/snapcraft#108, which added glob support.
84%