I've installed the dev version of tools to try and...
# tools
i
I've installed the dev version of tools to try and fix a linting error in CI and apparently it crashes on any command because it can't parse the version?
Copy code
│ /opt/conda/lib/python3.13/re/__init__.py:208 in sub                                              │
│                                                                                                  │
│   205 │   │   │   DeprecationWarning, stacklevel=2                                               │
│   206 │   │   )                                                                                  │
│   207 │                                                                                          │
│ ❱ 208 │   return _compile(pattern, flags).sub(repl, string, count)                               │
│   209 sub.__text_signature__ = '(pattern, repl, string, count=0, flags=0)'                       │
│   210                                                                                            │
│   211 def subn(pattern, repl, string, *args, count=_zero_sentinel, flags=_zero_sentinel):        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: expected string or bytes-like object, got 'NoneType'
m
can you try to run it with
nf-core --verbose
?
i
This is the full output of
nf-core --verbose
Copy code
,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version None - <https://nf-co.re>
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/conda/bin/nf-core:6 in <module>                                                             │
│                                                                                                  │
│   3 from nf_core.__main__ import run_nf_core                                                     │
│   4 if __name__ == '__main__':                                                                   │
│   5 │   sys.argv[0] = sys.argv[0].removesuffix('.exe')                                           │
│ ❱ 6 │   sys.exit(run_nf_core())                                                                  │
│   7                                                                                              │
│                                                                                                  │
│ /opt/conda/lib/python3.13/site-packages/nf_core/__main__.py:124 in run_nf_core                   │
│                                                                                                  │
│    121 │   │   │   highlight=False,                                                              │
│    122 │   │   )                                                                                 │
│    123 │   │   try:                                                                              │
│ ❱  124 │   │   │   is_outdated, _, remote_vers = check_if_outdated()                             │
│    125 │   │   │   if is_outdated:                                                               │
│    126 │   │   │   │   stderr.print(                                                             │
│    127 │   │   │   │   │   f"[bold bright_yellow]    There is a new version of nf-core/tools av  │
│                                                                                                  │
│ /opt/conda/lib/python3.13/site-packages/nf_core/utils.py:172 in check_if_outdated                │
│                                                                                                  │
│    169 │   # Set and clean up the current version string                                         │
│    170 │   if current_version is None:                                                           │
│    171 │   │   current_version = nf_core.__version__                                             │
│ ❱  172 │   current_version = re.sub(r"[^0-9\.]", "", current_version)                            │
│    173 │   # Build the URL to check against                                                      │
│    174 │   source_url = os.environ.get("NFCORE_VERSION_URL", source_url)                         │
│    175 │   source_url = f"{source_url}?v={current_version}"                                      │
│                                                                                                  │
│ /opt/conda/lib/python3.13/re/__init__.py:208 in sub                                              │
│                                                                                                  │
│   205 │   │   │   DeprecationWarning, stacklevel=2                                               │
│   206 │   │   )                                                                                  │
│   207 │                                                                                          │
│ ❱ 208 │   return _compile(pattern, flags).sub(repl, string, count)                               │
│   209 sub.__text_signature__ = '(pattern, repl, string, count=0, flags=0)'                       │
│   210                                                                                            │
│   211 def subn(pattern, repl, string, *args, count=_zero_sentinel, flags=_zero_sentinel):        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: expected string or bytes-like object, got 'NoneType'
m
what was the exact command you ran?
i
nf-core --verbose
, also tried
nf-core p lint
with the same effect
m
can you run
pip install --upgrade --force-reinstall git+<https://github.com/nf-core/tools.git@dev>
again
i
New error, this time from pip
Copy code
× Cannot uninstall nf-core None
╰─> The package's contents are unknown: no RECORD file was found for nf-core.
I fixed it and reinstalled, now I'm getting a new error:
Copy code
│ /root/nf-core/lib/python3.13/site-packages/nf_core/pipelines/lint/files_exist.py:201 in          │
│ files_exist                                                                                      │
│                                                                                                  │
│   198 │   │   Path("lib", "Utils.groovy"),                                                       │
│   199 │   │   Path("lib", "Workflow.groovy"),                                                    │
│   200 │   │   Path("lib", "WorkflowMain.groovy"),                                                │
│ ❱ 201 │   │   Path("lib", f"Workflow{short_name[0].upper()}{short_name[1:]}.groovy"),            │
│   202 │   │   Path("parameters.settings.json"),                                                  │
│   203 │   │   Path("pipeline_template.yml"),  # saving information in .nf-core.yml               │
│   204 │   │   Path("Singularity"),                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
IndexError: string index out of range
I can send the full stacktrace if needed
m
how does your manifest in nextflow.config look like?
i
Copy code
manifest {
    name            = 'nf-core/reportho'
    contributors    = [
        [
            name: 'Igor Trujnara',
            affiliation: 'Centre for Genomic Regulation',
            email: '<mailto:igor.trujnara@crg.eu|igor.trujnara@crg.eu>',
            github: 'itrujnara',
            contribution: ['author', 'maintainer'], // List of contribution types ('author', 'maintainer' or 'contributor')
            orcid: '0000-0002-8735-5976'
        ],
        [
            name: 'Luisa Santus',
            affiliation: 'Centre for Genomic Regulation',
            email: '<mailto:luisa.santus@crg.eu|luisa.santus@crg.eu>',
            contribution: ['contributor'],
            orcid: '0000-0002-5992-0771'
        ],
        [
            name: 'Jose Espinosa-Carrasco',
            affiliation: 'Centre for Genomic Regulation',
            email: '<mailto:jose.espinosa@crg.eu|jose.espinosa@crg.eu>',
            contribution: ['contributor'],
            orcid: '0000-0002-1541-042X'
        ],
        [
            name: 'Alessio Vignoli',
            affiliation: 'Centre for Genomic Regulation',
            email: '<mailto:alessio.vignoli@crg.eu|alessio.vignoli@crg.eu>',
            contribution: ['contributor'],
            orcid: '0000-0001-7131-2915'
        ]
    ]
    homePage        = '<https://github.com/nf-core/reportho>'
    description     = """A pipeline for ortholog fetching and analysis"""
    mainScript      = '<http://main.nf|main.nf>'
    defaultBranch   = 'main'
    nextflowVersion = '!>=25.10.4'
    version         = '1.2.0dev'
    doi             = '10.5281/zenodo.11574565'
}
m
do you have a PR that i can check?
i
A well-scoped commit saved the day, that does not solve the crazy tools in the codespace. I'll return to it when it bites again.
m
you have an outdated cache (we switched how we parse configs in dev): remove
~/.nextflow/nf-core/
and it will work
i
Thanks, it worked. It's always a cache. Now I can go back to going insane about strict syntax.
m
christmas-special-party-gif-by-all-creatures-great-and-small.gif