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

[BUG] KeyError when installing modules #1418

Closed
2 tasks done
prmac opened this issue Feb 9, 2022 · 1 comment · Fixed by #1449
Closed
2 tasks done

[BUG] KeyError when installing modules #1418

prmac opened this issue Feb 9, 2022 · 1 comment · Fixed by #1449
Labels
bug Something isn't working

Comments

@prmac
Copy link

prmac commented Feb 9, 2022

Check Documentation

I have checked the following places for your error:

Description of the bug

Module installation fails.
nf-core/tools version 2.2

Steps to reproduce

Steps to reproduce the behaviour:

  1. Try installing a module, eg$ nf-core modules install bwa/mem
  2. See error:
                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 2.2



INFO     Creating missing 'module.json' file.                                                                                                                                                                                                             modules_command.py:107
╭───────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/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/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/nf_core/__main__.py:62 in run_nf_core                                                                                                 │
│                                                                                                                                                                                                      │
│    61 │   # Lanch the click cli                                                                                                                                                                      │
│ ❱  62 │   nf_core_cli()                                                                                                                                                                              │
│    63                                                                                                                                                                                                │
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/click/core.py:1128 in __call__                                                                                                        │
│                                                                                                                                                                                                      │
│   1127 │   │   """Alias for :meth:`main`."""                                                                                                                                                         │
│ ❱ 1128 │   │   return self.main(*args, **kwargs)                                                                                                                                                     │
│   1129                                                                                                                                                                                               │
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/click/core.py:1053 in main                                                                                                            │
│                                                                                                                                                                                                      │
│   1052 │   │   │   │   with self.make_context(prog_name, args, **extra) as ctx:                                                                                                                      │
│ ❱ 1053 │   │   │   │   │   rv = self.invoke(ctx)                                                                                                                                                     │
│   1054 │   │   │   │   │   if not standalone_mode:                                                                                                                                                   │
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/click/core.py:1659 in invoke                                                                                                          │
│                                                                                                                                                                                                      │
│   1658 │   │   │   │   with sub_ctx:                                                                                                                                                                 │
│ ❱ 1659 │   │   │   │   │   return _process_result(sub_ctx.command.invoke(sub_ctx))                                                                                                                   │
│   1660                                                                                                                                                                                               │
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/click/core.py:1659 in invoke                                                                                                          │
│                                                                                                                                                                                                      │
│   1658 │   │   │   │   with sub_ctx:                                                                                                                                                                 │
│ ❱ 1659 │   │   │   │   │   return _process_result(sub_ctx.command.invoke(sub_ctx))                                                                                                                   │
│   1660                                                                                                                                                                                               │
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/click/core.py:1395 in invoke                                                                                                          │
│                                                                                                                                                                                                      │
│   1394 │   │   if self.callback is not None:                                                                                                                                                         │
│ ❱ 1395 │   │   │   return ctx.invoke(self.callback, **ctx.params)                                                                                                                                    │
│   1396                                                                                                                                                                                               │
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/click/core.py:754 in invoke                                                                                                           │
│                                                                                                                                                                                                      │
│    753 │   │   │   with ctx:                                                                                                                                                                         │
│ ❱  754 │   │   │   │   return __callback(*args, **kwargs)                                                                                                                                            │
│    755                                                                                                                                                                                               │
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/click/decorators.py:26 in new_func                                                                                                    │
│                                                                                                                                                                                                      │
│    25 │   def new_func(*args, **kwargs):  # type: ignore                                                                                                                                             │
│ ❱  26 │   │   return f(get_current_context(), *args, **kwargs)                                                                                                                                       │
│    27                                                                                                                                                                                                │
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/nf_core/__main__.py:436 in install                                                                                                    │
│                                                                                                                                                                                                      │
│   435 │   │   module_install.modules_repo = ctx.obj["modules_repo_obj"]                                                                                                                              │
│ ❱ 436 │   │   exit_status = module_install.install(tool)                                                                                                                                             │
│   437 │   │   if not exit_status and all:                                                                                                                                                            │
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/nf_core/modules/install.py:28 in install                                                                                              │
│                                                                                                                                                                                                      │
│    27 │   │   # Check whether pipelines is valid                                                                                                                                                     │
│ ❱  28 │   │   if not self.has_valid_directory():                                                                                                                                                     │
│    29 │   │   │   return False                                                                                                                                                                       │
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/nf_core/modules/modules_command.py:98 in has_valid_directory                                                                          │
│                                                                                                                                                                                                      │
│    97 │   │   try:                                                                                                                                                                                   │
│ ❱  98 │   │   │   self.has_modules_file()                                                                                                                                                            │
│    99 │   │   │   return True                                                                                                                                                                        │
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/nf_core/modules/modules_command.py:109 in has_modules_file                                                                            │
│                                                                                                                                                                                                      │
│   108 │   │   │   try:                                                                                                                                                                               │
│ ❱ 109 │   │   │   │   nf_core.modules.module_utils.create_modules_json(self.dir)                                                                                                                     │
│   110 │   │   │   except UserWarning as e:                                                                                                                                                           │
│                                                                                                                                                                                                      │
│ /home/paul/anaconda3/envs/nf-tools/lib/python3.7/site-packages/nf_core/modules/module_utils.py:129 in create_modules_json                                                                            │
│                                                                                                                                                                                                      │
│   128 │   pipeline_config = nf_core.utils.fetch_wf_config(pipeline_dir)                                                                                                                              │
│ ❱ 129 │   pipeline_name = pipeline_config["manifest.name"]                                                                                                                                           │
│   130 │   pipeline_url = pipeline_config["manifest.homePage"]                                                                                                                                        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
KeyError: 'manifest.name'

Expected behaviour

Successful installation of desired module

Log files

Have you provided the following extra information/files:

  • [ x ] The command used to run the module

System

  • Hardware: Server
  • Executor: local
  • OS: Ubuntu 18.04.3

Nextflow Installation

  • Version: 21.10.6.5660

Container engine

  • Engine: Conda
  • version: 4.9.0
  • Image tag:

Additional context

@edmundmiller edmundmiller transferred this issue from nf-core/modules Feb 22, 2022
@edmundmiller
Copy link
Contributor

Moved this to tools to get it in front of the right people!

It's a good catch, in the meantime could you try just running nf-core modules install and using the interactive selection?

If that doesn't work, can you copy over a modules.json from another repo and try to install again then?

@ewels ewels added the bug Something isn't working label Mar 1, 2022
ewels added a commit to ewels/nf-core-tools that referenced this issue Mar 15, 2022
@ewels ewels linked a pull request Mar 15, 2022 that will close this issue
4 tasks
@ewels ewels closed this as completed Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants