Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): Fix crash in templateflow get when matching one file #140

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

effigies
Copy link
Contributor

Currently:

❯ uvx templateflow get MNI152NLin6Asym --res 2 --desc LR -s T1w
Traceback (most recent call last):
  File "/home/chris/.cache/uv/archive-v0/N20Na8Y61YObB3kT5W_Jk/bin/templateflow", line 10, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/chris/.cache/uv/archive-v0/N20Na8Y61YObB3kT5W_Jk/lib/python3.13/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/chris/.cache/uv/archive-v0/N20Na8Y61YObB3kT5W_Jk/lib/python3.13/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/chris/.cache/uv/archive-v0/N20Na8Y61YObB3kT5W_Jk/lib/python3.13/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/home/chris/.cache/uv/archive-v0/N20Na8Y61YObB3kT5W_Jk/lib/python3.13/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chris/.cache/uv/archive-v0/N20Na8Y61YObB3kT5W_Jk/lib/python3.13/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/chris/.cache/uv/archive-v0/N20Na8Y61YObB3kT5W_Jk/lib/python3.13/site-packages/templateflow/cli.py", line 144, in get
    click.echo('\n'.join(f'{match}' for match in api.get(template, **entities)))
                                                 ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'PosixPath' object is not iterable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant