nf-core / nf-core/tools

nf-core lint - ValueError: not enough values to unpack (expected 2, got 1)

Open
#2,445 2 comments 1 reaction 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

Running nf-core lint on a workflow where the config file does not have a "manifest.name" section results in a ValueError from nf-core.

Seems like the fallback value for the missing section is an empty string which can't be split into two values. From nf_core.utils line 180:

self.pipeline_prefix, self.pipeline_name = self.nf_config.get("manifest.name", "").strip("'").split("/")
Command used and terminal output
$ nf-core lint
...
venv/lib/python3.9/site-packages/nf_core/utils.py:18 │
│ 0 in _load_pipeline_config                                                                       │
│                                                                                                  │
│    177 │   │   """                                                                               │
│    178 │   │   self.nf_config = fetch_wf_config(self.wf_path)                                    │
│    179 │   │                                                                                     │
│ ❱  180 │   │   self.pipeline_prefix, self.pipeline_name = self.nf_config.get("manifest.name", "  │
│    181 │   │                                                                                     │
│    182 │   │   nextflowVersionMatch = re.search(r"[0-9\.]+(-edge)?", self.nf_config.get("manife  │
│    183 │   │   if nextflowVersionMatch:                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: not enough values to unpack (expected 2, got 1)
System information
  • Nextflow version 20.10.0
  • OS CentOS 7
  • Version of nf-core/tools 2.10
  • Python version 3.9.2

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 in nf_core/utils.py at line 180, where _load_pipeline_config splits the manifest.name fallback, and reproduce the failure with nf-core lint on a workflow missing that section. Ensure the missing configuration no longer raises this ValueError, then rerun the reported command to verify the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.