nf-core / nf-core/tools

IndexError: string index out of range

Open
#4,464 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
322
Forks
255
Avg merge
2d 3h
Merged PRs (30d)
5

Description

Description of the bug

Hi,

Sorry for the non very descriptive title but I don't know what's going on here.

When running nf-core pipelines lint [-release] on the [nf-core/stableexpression pipeline, I get:

WARNING  Expected manifest.name to be in the format '<repo>/<pipeline>'. Will assume it is '<pipeline>'.                                                                                                                                                              
╭───────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────────────────────────────────────────────╮
│ <home>/micromamba/envs/nfcore/bin/nf-core:10 in <module>                                                                                                                                      │
│                                                                                                                                                                                                      │
│    9 │   sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])                                                                                                                           │
│ ❱ 10 │   sys.exit(run_nf_core())                                                                                                                                                                     │
│   11                                                                                                                                                                                                 │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/nf_core/__main__.py:90 in run_nf_core                                                                                              │
│                                                                                                                                                                                                      │
│     89 │   # Launch the click cli                                                                                                                                                                    │
│ ❱   90 │   nf_core_cli(auto_envvar_prefix="NFCORE")                                                                                                                                                  │
│     91                                                                                                                                                                                               │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/rich_click/rich_command.py:402 in __call__                                                                                         │
│                                                                                                                                                                                                      │
│   401 │   │   # seem to think RichGroups are callable. (No issues with Mypy, though.)                                                                                                                │
│ ❱ 402 │   │   return super().__call__(*args, **kwargs)                                                                                                                                               │
│   403                                                                                                                                                                                                │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/click/core.py:1485 in __call__                                                                                                     │
│                                                                                                                                                                                                      │
│   1484 │   │   """Alias for :meth:`main`."""                                                                                                                                                         │
│ ❱ 1485 │   │   return self.main(*args, **kwargs)                                                                                                                                                     │
│   1486                                                                                                                                                                                               │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/rich_click/rich_command.py:216 in main                                                                                             │
│                                                                                                                                                                                                      │
│   215 │   │   │   │   with self.make_context(prog_name, args, **extra) as ctx:                                                                                                                       │
│ ❱ 216 │   │   │   │   │   rv = self.invoke(ctx)                                                                                                                                                      │
│   217 │   │   │   │   │   if not standalone_mode:                                                                                                                                                    │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/click/core.py:1873 in invoke                                                                                                       │
│                                                                                                                                                                                                      │
│   1872 │   │   │   │   with sub_ctx:                                                                                                                                                                 │
│ ❱ 1873 │   │   │   │   │   return _process_result(sub_ctx.command.invoke(sub_ctx))                                                                                                                   │
│   1874                                                                                                                                                                                               │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/click/core.py:1873 in invoke                                                                                                       │
│                                                                                                                                                                                                      │
│   1872 │   │   │   │   with sub_ctx:                                                                                                                                                                 │
│ ❱ 1873 │   │   │   │   │   return _process_result(sub_ctx.command.invoke(sub_ctx))                                                                                                                   │
│   1874                                                                                                                                                                                               │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/click/core.py:1269 in invoke                                                                                                       │
│                                                                                                                                                                                                      │
│   1268 │   │   if self.callback is not None:                                                                                                                                                         │
│ ❱ 1269 │   │   │   return ctx.invoke(self.callback, **ctx.params)                                                                                                                                    │
│   1270                                                                                                                                                                                               │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/click/core.py:824 in invoke                                                                                                        │
│                                                                                                                                                                                                      │
│    823 │   │   │   with ctx:                                                                                                                                                                         │
│ ❱  824 │   │   │   │   return callback(*args, **kwargs)                                                                                                                                              │
│    825                                                                                                                                                                                               │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/click/decorators.py:34 in new_func                                                                                                 │
│                                                                                                                                                                                                      │
│    33 │   def new_func(*args: P.args, **kwargs: P.kwargs) -> R:                                                                                                                                      │
│ ❱  34 │   │   return f(get_current_context(), *args, **kwargs)                                                                                                                                       │
│    35                                                                                                                                                                                                │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/nf_core/__main__.py:294 in command_pipelines_lint                                                                                  │
│                                                                                                                                                                                                      │
│    293 │                                                                                                                                                                                             │
│ ❱  294 │   pipelines_lint(                                                                                                                                                                           │
│    295 │   │   ctx, directory, release, fix, key, show_passed, fail_ignored, fail_warned, markd                                                                                                      │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/nf_core/commands_pipelines.py:139 in pipelines_lint                                                                                │
│                                                                                                                                                                                                      │
│   138 │   try:                                                                                                                                                                                       │
│ ❱ 139 │   │   lint_obj, module_lint_obj, subworkflow_lint_obj = run_linting(                                                                                                                         │
│   140 │   │   │   directory,                                                                                                                                                                         │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/nf_core/pipelines/lint/__init__.py:667 in run_linting                                                                              │
│                                                                                                                                                                                                      │
│   666 │   try:                                                                                                                                                                                       │
│ ❱ 667 │   │   lint_obj._lint_pipeline()                                                                                                                                                              │
│   668 │   except AssertionError as e:                                                                                                                                                                │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/nf_core/pipelines/lint/__init__.py:276 in _lint_pipeline                                                                           │
│                                                                                                                                                                                                      │
│   275 │   │   │   │   log.debug(f"Running lint test: {test_name}")                                                                                                                                   │
│ ❱ 276 │   │   │   │   test_results = getattr(self, test_name)()                                                                                                                                      │
│   277 │   │   │   │   for test in test_results.get("passed", []):                                                                                                                                    │
│                                                                                                                                                                                                      │
│ <home>/micromamba/envs/nfcore/lib/python3.14/site-packages/nf_core/pipelines/lint/files_exist.py:201 in files_exist                                                                           │
│                                                                                                                                                                                                      │
│   200 │   │   Path("lib", "WorkflowMain.groovy"),                                                                                                                                                    │
│ ❱ 201 │   │   Path("lib", f"Workflow{short_name[0].upper()}{short_name[1:]}.groovy"),                                                                                                                │
│   202 │   │   Path("parameters.settings.json"),                                                                                                                                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
IndexError: string index out of range

nf-core/tools version: 4.1.0
I do not have this error with nf-core/tools 4.0.3.

Thanks!

Command used and terminal output

System information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing nf-core pipelines lint [-release] against the linked nf-core/stableexpression pipeline and capture the complete traceback, which is truncated in the report. Trace the IndexError from the lint command and verify that the command reports the manifest.name format problem without crashing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.