← Back to issue list

ValueError: 'store_true' is not callable

View original Github issue

Metadata

Project
charmcraft
Number
#210
Type
issue
State
closed
Author
davigar15
Labels
—
Created
Updated
Closed

Current evaluation

Charmcraft init was fixed in a subsequent edge release after snap revision 185 exposed a malformed argparse declaration for store_true.

Resolution: closed resolved

Reason: Issue metadata records the parser declaration as corrected in a subsequent Charmcraft edge release. Commit d24579ae from PR #200 introduced the affected init force option and is the likely regression source.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Hello, This issue is happening with charmcraft --edge (185) ``` $ charmcraft init --name jvb --project-dir jvb-operator 2020-12-07 18:46:06,446 charmcraft.guard DEBUG Starting charmcraft version 0.6.1+16.g86d77d9 2020-12-07 18:46:06,446 charmcraft.main DEBUG Raw pre-parsed sysargs: flags={'help': False, 'verbose': False, 'quiet': False} filtered=['init', '--name', 'jvb', '--project-dir', 'jvb-operator'] 2020-12-07 18:46:06,446 charmcraft.main DEBUG General parsed sysargs: command='init' args=['--name', 'jvb', '--project-dir', 'jvb-operator'] 2020-12-07 18:46:06,447 charmcraft ERROR charmcraft internal error! ValueError: 'store_true' is not callable (full execution logs in /home/davigar15/snap/charmcraft/common/charmcraft-log-lt9ik5bo) 2020-12-07 18:46:06,447 charmcraft.guard ERROR Traceback (most recent call last): File "/snap/charmcraft/185/lib/charmcraft/main.py", line 255, in main dispatcher = Dispatcher(argv[1:], COMMAND_GROUPS) File "/snap/charmcraft/185/lib/charmcraft/main.py", line 157, in __init__ self.command, self.parsed_args = self._load_command(command_name, cmd_args) File "/snap/charmcraft/185/lib/charmcraft/main.py", line 179, in _load_command cmd.fill_parser(parser) File "/snap/charmcraft/185/lib/charmcraft/commands/init.py", line 82, in fill_parser parser.add_argument( File "/usr/lib/python3.8/argparse.py", line 1385, in add_argument raise ValueError('%r is not callable' % (type_func,)) ValueError: 'store_true' is not callable ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Charmcraft init was fixed in a subsequent edge release after snap revision 185 exposed a malformed argparse declaration for store_true.
stealth/space-bunny-alpha — closed resolved Charmcraft’s malformed argparse declaration broke init; issue #210 was marked fixed after correcting the argument specification in a subsequent release.
stealth/space-bunny-alpha — closed resolved Fixed charmcraft init's incorrect argparse argument specification that caused ValueError: 'store_true' is not callable; the issue record reports a fix in a subsequent release.
qwen3.6-35b-a3b-mtp-q6 — — Fixed. The charmcraft init command failed due to incorrect argparse argument specification. The bug was resolved in a subsequent release.
qwen/qwen3.6-35b-a3b — — Fixed incorrect argparse action configuration in commands/init.py that caused a ValueError during charmcraft init. The argument parser setup was corrected and the issue closed.
qwen/qwen3.6-35b-a3b — — A ValueError: 'store_true' is not callable error occurs in charmcraft init. It was closed, indicating the bug was fixed by correcting the argparse configuration in the init command.
qwen3.6-35b-a3b-mtp-q6 — — Closed. The charmcraft init command crashed due to a malformed argparse action parameter. The bug was fixed by correcting the argument definition in commands/init.py to properly use action='store_true'.

Update history

No update history recorded yet.

Related work

  • Caused By: canonical/charmcraft#200 (confidence 90%)

    Its init force-option change landed immediately before edge revision 185 and matches the failing argparse path.

Related issues

No related issues found above the similarity threshold.