# Error with verdi archive create --help

**URL:** <https://aiida.discourse.group/t/error-with-verdi-archive-create-help/637>\
**Category:** General Usage\
**Created:** [September 4, 2025, 3:00pm UTC](https://aiida.discourse.group/t/error-with-verdi-archive-create-help/637 "2025-09-04T15:00:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ccigna](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@ccigna](https://aiida.discourse.group/u/ccigna)\
**Post date:** [September 4, 2025, 3:00pm UTC](https://aiida.discourse.group/t/error-with-verdi-archive-create-help/637/1 "2025-09-04T15:00:55Z")

</div>

Hello.

I’m getting this error when doing “verdi archive create -h” (but all good if I do “verdi archive -h”). Do you know why? Maybe it is useful to report. I’m using AiiDA v2.6.3.

> verdi archive create --help  
> Traceback (most recent call last):  
> File “/home/cignarella/.conda/envs/aiida2/bin/verdi”, line 8, in  
> sys.exit(verdi())  
> ^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 1442, in **call**  
> return self.main(\*args, \*\*kwargs)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 1363, in main  
> rv = self.invoke(ctx)  
> ^^^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 1830, in invoke  
> return \_process\_result(sub\_ctx.command.invoke(sub\_ctx))  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 1828, in invoke  
> sub\_ctx = cmd.make\_context(cmd\_name, args, parent=ctx)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 1186, in make\_context  
> self.parse\_args(ctx, args)  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/aiida/cmdline/groups/verdi.py”, line 113, in parse\_args  
> return super().parse\_args(ctx, args)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 1197, in parse\_args  
> value, args = param.handle\_parse\_result(ctx, opts, args)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 2416, in handle\_parse\_result  
> value = self.process\_value(ctx, value)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 2355, in process\_value  
> value = self.callback(ctx, self, value)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/decorators.py”, line 539, in show\_help  
> echo(ctx.get\_help(), color=ctx.color)  
> ^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 730, in get\_help  
> return self.command.get\_help(self)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 1064, in get\_help  
> self.format\_help(ctx, formatter)  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 1104, in format\_help  
> self.format\_options(ctx, formatter)  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 1135, in format\_options  
> rv = param.get\_help\_record(ctx)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 2795, in get\_help\_record  
> rv = [\_write\_opts(self.opts)]  
> ^^^^^^^^^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 2791, in \_write\_opts  
> rv += f" {self.make\_metavar(ctx=ctx)}"  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^  
> File “/home/cignarella/.conda/envs/aiida2/lib/python3.12/site-packages/click/core.py”, line 2212, in make\_metavar  
> metavar = self.type.get\_metavar(param=self, ctx=ctx)  
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
> TypeError: MultipleValueParamType.get\_metavar() got an unexpected keyword argument ‘ctx’

Best,

Chiara

---

<div class="post-metadata">

**Author:** ![danielhollas](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/danielhollas/32/4_2.png) [@danielhollas](https://aiida.discourse.group/u/danielhollas)\
**Post date:** [September 4, 2025, 4:37pm UTC](https://aiida.discourse.group/t/error-with-verdi-archive-create-help/637/2 "2025-09-04T16:37:52Z")

</div>

Hi @ccigna,

this looks like an issue with the new version of `click` package that is used in the verdi interface. You can confirm that by running `pip show click`. If you see version 8.2, that’s the version that does not currently work.

If you install `aiida-core` 2.6.4, it should automatically reinstall the `click`package back to version 8.1. Or you can reinstall older version of click manually by running something like

```shell
pip install click~=8.1.0

```

For reference, this is the tracking issue:

> <https://github.com/aiidateam/aiida-core/issues/6885>
>
> New version of click 8.2 has a lot of changes and breaks some of our custom verd…i functionality.
> This has not been noticed in the test yet since in uv.lock we're still on 8.1
> 
> I think I managed (after lot of work) to fix most of the stuff in #6883,
> but it's hard to be confident that everything works as before. So perhaps for 2.7.0 we should pin the click version in pyproject.toml, and release the support in 2.7.1 after more testing.

---

<div class="post-metadata">

**Author:** ![sphuber](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/sphuber/32/6_2.png) [@sphuber](https://aiida.discourse.group/u/sphuber)\
**Post date:** [September 8, 2025, 4:45pm UTC](https://aiida.discourse.group/t/error-with-verdi-archive-create-help/637/3 "2025-09-08T16:45:06Z")

</div>

We should really pin click to a minor release. They intentionally break the API in minor releases as they don’t follow semver. So this is happening each time they release a new minor version

---

<div class="post-metadata">

**Author:** ![danielhollas](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/danielhollas/32/4_2.png) [@danielhollas](https://aiida.discourse.group/u/danielhollas)\
**Post date:** [September 8, 2025, 5:25pm UTC](https://aiida.discourse.group/t/error-with-verdi-archive-create-help/637/4 "2025-09-08T17:25:52Z")

</div>

Agreed, this is exactly what I am proposing in

> <https://github.com/aiidateam/aiida-core/pull/6959>
>
> Depends on #6954.
> 
> Supersedes #6883. Closes #6885 
> 
> \[Click 8.2 changelog\](ht…tps://click.palletsprojects.com/en/stable/changes/#version-8-2-0)
> 
> Changes needed:
> 
> \- In click 8.2.0, just running \`verdi\` or \`python -m aiida\` without any arguments returns non-zero exit code. Some tests needed to be adjusted to account for this. https://github.com/pallets/click/pull/1489
> \- \> Keep stdout and stderr streams independent in CliRunner. Always collect stderr output and never raise an exception. Add a new output stream to simulate what the user sees in its terminal. Removes the mix\_stderr parameter in CliRunner. \[#2522\](https://github.com/pallets/click/issues/2522) \[#2523\](https://github.com/pallets/click/pull/2523)
> 
> This needed an adjustment in \`tests/conftest.py\`
> \- I've kept an upper pin for the click dependency. Since we patch a lot of click's behaviour and rely on its implementation details, it's likely that new version introduce breakages so we should guard against that.

(We’re already pinned on main and on 2.7 versions)

@ccigna have you been able to resolve your issue?
