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

Cryptic error by lint when file in modules/local has no process definition #1235

Closed
d4straub opened this issue Jul 28, 2021 · 1 comment · Fixed by #1243
Closed

Cryptic error by lint when file in modules/local has no process definition #1235

d4straub opened this issue Jul 28, 2021 · 1 comment · Fixed by #1243
Labels
Milestone

Comments

@d4straub
Copy link
Contributor

Is your feature request related to a problem? Please describe

nf-core lint reports a cryptic error when there is no process name in a file in modules/local.

Describe the solution you'd like

Ideally, printing the module/file that is failing.

Describe alternatives you've considered

Alternatively, printing that one of the files in modules/local lacks a process definition.

Additional context

nf-core lint error message:

Run nf-core -l lint_log.txt lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md
nf-core -l lint_log.txt lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.6.14/x64
GITHUB_COMMENTS_URL:
GITHUB_TOKEN: ***
GITHUB_PR_COMMIT:
,--./,-.
___ __ __ __ ___ /,-..--~
|\ | |__ __ / / \ |__) |__ } { | \| | \__, \__/ | \ |___ \-.
,--, .,.,'
nf-core/tools version 2.0.1
INFO Testing pipeline: /home/runner/work/ampliseq/ampliseq init.py:212
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /opt/hostedtoolcache/Python/3.6.14/x64/bin/nf-core:8 in │
│ │
│ 7 │ sys.argv[0] = re.sub(r'(-script.pyw|.exe)?$', '', sys.argv[0]) │
│ ❱ 8 │ sys.exit(run_nf_core()) │
│ 9 │
│ │
[....]
│ │
│ /opt/hostedtoolcache/Python/3.6.14/x64/lib/python3.6/site-packages/nf_core/m │
│ odules/lint/main_nf.py:151 in check_process_section │
│ │
│ 150 │ # Process name should be all capital letters │
│ ❱ 151 │ self.process_name = lines[0].split()[1] │
│ 152 │ if all([x.upper() for x in self.process_name]): │
╰──────────────────────────────────────────────────────────────────────────────╯
IndexError: list index out of range
Error: Process completed with exit code 1.

Can be also found in https://github.com/d4straub/ampliseq/runs/3171484455

The actual problem was that one file in modules/local was actually not describing a process and was clearly in the wrong folder, see here.

@chasemc
Copy link

chasemc commented Aug 4, 2021

Had an empty file in modules/local, same error

@ErikDanielsson ErikDanielsson linked a pull request Aug 18, 2021 that will close this issue
4 tasks
@ewels ewels added this to the 2.3 milestone Dec 9, 2021
@drpatelh drpatelh modified the milestones: 2.4, 2.3 Mar 8, 2022
@ewels ewels closed this as completed Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants