Skip to content

nf-core modules info samtools/view results in a stack trace #4267

@mahesh-panchal

Description

@mahesh-panchal

Description of the bug

nf-core modules info samtools/view results in a stack trace.

Command used and terminal output

$ nf-core modules info samtools/view
<frozen importlib._bootstrap>:491: RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module '_brotli', which has not declared that it can run safely without the GIL. To override this behavior and keep the GIL disabled (at your own risk), run with PYTHON_GIL=0 or -Xgil=0.


                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\ 
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 4.0.2 - https://nf-co.re


╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/bin/nf-core:10 in <module>   │
│                                                                                                  │
│    7                                                                                             │
│    8 if __name__ == '__main__':                                                                  │
│    9 │   sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])                       │
│ ❱ 10 │   sys.exit(run_nf_core())                                                                 │
│   11                                                                                             │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/nf_core/__main__.py:130 in run_nf_core                                                         │
│                                                                                                  │
│    127 │   │   │   log.debug(f"Could not check latest version: {e}")                             │
│    128 │   │   stderr.print("\n")                                                                │
│    129 │   # Launch the click cli                                                                │
│ ❱  130 │   nf_core_cli(auto_envvar_prefix="NFCORE")                                              │
│    131                                                                                           │
│    132                                                                                           │
│    133 @tui(command="interface", help="Launch the nf-core interface")                            │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/rich_click/rich_command.py:402 in __call__                                                     │
│                                                                                                  │
│   399 │   │   # Include this here because I run into a false warning                             │
│   400 │   │   # in the PyCharm IDE otherwise; for some reason PyCharm doesn't                    │
│   401 │   │   # seem to think RichGroups are callable. (No issues with Mypy, though.)            │
│ ❱ 402 │   │   return super().__call__(*args, **kwargs)                                           │
│   403 │                                                                                          │
│   404 │   @overload                                                                              │
│   405 │   def command(self, __func: Callable[..., Any]) -> RichCommand: ...                      │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/click/core.py:1514 in __call__                                                                 │
│                                                                                                  │
│   1511 │                                                                                         │
│   1512 │   def __call__(self, *args: t.Any, **kwargs: t.Any) -> t.Any:                           │
│   1513 │   │   """Alias for :meth:`main`."""                                                     │
│ ❱ 1514 │   │   return self.main(*args, **kwargs)                                                 │
│   1515                                                                                           │
│   1516                                                                                           │
│   1517 class _FakeSubclassCheck(type):                                                           │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/rich_click/rich_command.py:216 in main                                                         │
│                                                                                                  │
│   213 │   │   try:                                                                               │
│   214 │   │   │   try:                                                                           │
│   215 │   │   │   │   with self.make_context(prog_name, args, **extra) as ctx:                   │
│ ❱ 216 │   │   │   │   │   rv = self.invoke(ctx)                                                  │
│   217 │   │   │   │   │   if not standalone_mode:                                                │
│   218 │   │   │   │   │   │   return rv                                                          │
│   219 │   │   │   │   │   # it's not safe to `ctx.exit(rv)` here!                                │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/click/core.py:1902 in invoke                                                                   │
│                                                                                                  │
│   1899 │   │   │   │   super().invoke(ctx)                                                       │
│   1900 │   │   │   │   sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)                    │
│   1901 │   │   │   │   with sub_ctx:                                                             │
│ ❱ 1902 │   │   │   │   │   return _process_result(sub_ctx.command.invoke(sub_ctx))               │
│   1903 │   │                                                                                     │
│   1904 │   │   # In chain mode we create the contexts step by step, but after the                │
│   1905 │   │   # base command has been invoked.  Because at that point we do not                 │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/click/core.py:1902 in invoke                                                                   │
│                                                                                                  │
│   1899 │   │   │   │   super().invoke(ctx)                                                       │
│   1900 │   │   │   │   sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)                    │
│   1901 │   │   │   │   with sub_ctx:                                                             │
│ ❱ 1902 │   │   │   │   │   return _process_result(sub_ctx.command.invoke(sub_ctx))               │
│   1903 │   │                                                                                     │
│   1904 │   │   # In chain mode we create the contexts step by step, but after the                │
│   1905 │   │   # base command has been invoked.  Because at that point we do not                 │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/click/core.py:1298 in invoke                                                                   │
│                                                                                                  │
│   1295 │   │   │   echo(style(message, fg="red"), err=True)                                      │
│   1296 │   │                                                                                     │
│   1297 │   │   if self.callback is not None:                                                     │
│ ❱ 1298 │   │   │   return ctx.invoke(self.callback, **ctx.params)                                │
│   1299 │                                                                                         │
│   1300 │   def shell_complete(self, ctx: Context, incomplete: str) -> list[CompletionItem]:      │
│   1301 │   │   """Return a list of completions for the incomplete value. Looks                   │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/click/core.py:853 in invoke                                                                    │
│                                                                                                  │
│    850 │   │                                                                                     │
│    851 │   │   with augment_usage_errors(self):                                                  │
│    852 │   │   │   with ctx:                                                                     │
│ ❱  853 │   │   │   │   return callback(*args, **kwargs)                                          │
│    854 │                                                                                         │
│    855 │   def forward(self, cmd: Command, /, *args: t.Any, **kwargs: t.Any) -> t.Any:           │
│    856 │   │   """Similar to :meth:`invoke` but fills in default keyword                         │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/click/decorators.py:34 in new_func                                                             │
│                                                                                                  │
│    31 │   """                                                                                    │
│    32 │                                                                                          │
│    33 │   def new_func(*args: P.args, **kwargs: P.kwargs) -> R:                                  │
│ ❱  34 │   │   return f(get_current_context(), *args, **kwargs)                                   │
│    35 │                                                                                          │
│    36 │   return update_wrapper(new_func, f)                                                     │
│    37                                                                                            │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/nf_core/__main__.py:1399 in command_modules_info                                               │
│                                                                                                  │
│   1396 │   """                                                                                   │
│   1397 │   Show developer usage information about a given module.                                │
│   1398 │   """                                                                                   │
│ ❱ 1399 │   modules_info(ctx, tool, directory)                                                    │
│   1400                                                                                           │
│   1401                                                                                           │
│   1402 # nf-core modules bump-versions                                                           │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/nf_core/commands_modules.py:307 in modules_info                                                │
│                                                                                                  │
│   304 │   │   │   ctx.obj["modules_repo_branch"],                                                │
│   305 │   │   │   ctx.obj["modules_repo_no_pull"],                                               │
│   306 │   │   )                                                                                  │
│ ❱ 307 │   │   stdout.print(module_info.get_component_info())                                     │
│   308 │   except (UserWarning, LookupError) as e:                                                │
│   309 │   │   log.error(e)                                                                       │
│   310 │   │   sys.exit(1)                                                                        │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/nf_core/components/info.py:173 in get_component_info                                           │
│                                                                                                  │
│   170 │   │   if self.meta is None:                                                              │
│   171 │   │   │   raise UserWarning(f"Could not find {self.component_type[:-1]} '{self.compone   │
│   172 │   │                                                                                      │
│ ❱ 173 │   │   return self.generate_component_info_help()                                         │
│   174 │                                                                                          │
│   175 │   def get_local_yaml(self) -> dict | None:                                               │
│   176 │   │   """Attempt to get the meta.yml file from a locally installed module/subworkflow.   │
│                                                                                                  │
│ /Users/mahpa906/Documents/Projects/nf-core-aMeta/.pixi/envs/default/lib/python3.14t/site-package │
│ s/nf_core/components/info.py:306 in generate_component_info_help                                 │
│                                                                                                  │
│   303 │   │   │   │   inputs_table.add_row(f"[italic]input[{i}][/]", "", "")                     │
│   304 │   │   │   │   if self.component_type == "modules":                                       │
│   305 │   │   │   │   │   for element in input_channel:                                          │
│ ❱ 306 │   │   │   │   │   │   for key, info in element.items():                                  │
│   307 │   │   │   │   │   │   │   inputs_table.add_row(                                          │
│   308 │   │   │   │   │   │   │   │   f"[orange1 on black] {key} [/][dim i] ({info['type']})",   │
│   309 │   │   │   │   │   │   │   │   Markdown(info["description"] if info["description"] else   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'str' object has no attribute 'items'

System information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions