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

Unhandled exception when parsing config #2126

Closed
ewels opened this issue Dec 13, 2022 · 1 comment · Fixed by #2134
Closed

Unhandled exception when parsing config #2126

ewels opened this issue Dec 13, 2022 · 1 comment · Fixed by #2134
Labels
bug Something isn't working
Milestone

Comments

@ewels
Copy link
Member

ewels commented Dec 13, 2022

From Slack:


Hello! I am trying to install the ampliseq pipeline with nf-core download --singularity-cache-only , but I get the following error:

 /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/site-packages/rich_click/rich_group.py:21 in   │
│ main                                                                                                              │
│                                                                                                                   │
│   20 │   │   try:                                                                                                 │
│ ❱ 21 │   │   │   rv = super().main(*args, standalone_mode=False, **kwargs)                                        │
│   22 │   │   │   if not standalone_mode:                                                                          │
│                                                                                                                   │
│ /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/site-packages/click/core.py:1055 in main       │
│                                                                                                                   │
│   1054 │   │   │   │   with self.make_context(prog_name, args, **extra) as ctx:                                   │
│ ❱ 1055 │   │   │   │   │   rv = self.invoke(ctx)                                                                  │
│   1056 │   │   │   │   │   if not standalone_mode:                                                                │
│                                                                                                                   │
│ /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/site-packages/click/core.py:1657 in invoke     │
│                                                                                                                   │
│   1656 │   │   │   │   with sub_ctx:                                                                              │
│ ❱ 1657 │   │   │   │   │   return _process_result(sub_ctx.command.invoke(sub_ctx))                                │
│   1658                                                                                                            │
│                                                                                                                   │
│ /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/site-packages/click/core.py:1404 in invoke     │
│                                                                                                                   │
│   1403 │   │   if self.callback is not None:                                                                      │
│ ❱ 1404 │   │   │   return ctx.invoke(self.callback, **ctx.params)                                                 │
│   1405                                                                                                            │
│                                                                                                                   │
│ /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/site-packages/click/core.py:760 in invoke      │
│                                                                                                                   │
│    759 │   │   │   with ctx:                                                                                      │
│ ❱  760 │   │   │   │   return __callback(*args, **kwargs)                                                         │
│    761                                                                                                            │
│                                                                                                                   │
│ /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/site-packages/nf_core/__main__.py:244 in       │
│ download                                                                                                          │
│                                                                                                                   │
│    243 │   )                                                                                                      │
│ ❱  244 │   dl.download_workflow()                                                                                 │
│    245                                                                                                            │
│                                                                                                                   │
│ /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/site-packages/nf_core/download.py:176 in       │
│ download_workflow                                                                                                 │
│                                                                                                                   │
│   175 │   │   if self.container == "singularity":                                                                 │
│ ❱ 176 │   │   │   self.find_container_images()                                                                    │
│   177 │   │   │   try:                                                                                            │
│                                                                                                                   │
│ /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/site-packages/nf_core/download.py:445 in       │
│ find_container_images                                                                                             │
│                                                                                                                   │
│   444 │   │   # Use linting code to parse the pipeline nextflow config                                            │
│ ❱ 445 │   │   self.nf_config = nf_core.utils.fetch_wf_config(os.path.join(self.outdir,                            │
│       "workflow"))                                                                                                │
│   446                                                                                                             │
│                                                                                                                   │
│ /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/site-packages/nf_core/utils.py:251 in          │
│ fetch_wf_config                                                                                                   │
│                                                                                                                   │
│    250 │   │   │   with open(cache_path, "r") as fh:                                                              │
│ ❱  251 │   │   │   │   config = json.load(fh)                                                                     │
│    252 │   │   │   return config                                                                                  │
│                                                                                                                   │
│ /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/json/__init__.py:293 in load                   │
│                                                                                                                   │
│   292 │   """                                                                                                     │
│ ❱ 293 │   return loads(fp.read(),                                                                                 │
│   294 │   │   cls=cls, object_hook=object_hook,                                                                   │
│                                                                                                                   │
│ /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/json/__init__.py:357 in loads                  │
│                                                                                                                   │
│   356 │   │   │   parse_constant is None and object_pairs_hook is None and not kw):                               │
│ ❱ 357 │   │   return _default_decoder.decode(s)                                                                   │
│   358 │   if cls is None:                                                                                         │
│                                                                                                                   │
│ /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/json/decoder.py:337 in decode                  │
│                                                                                                                   │
│   336 │   │   """                                                                                                 │
│ ❱ 337 │   │   obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                   │
│   338 │   │   end = _w(s, end).end()                                                                              │
│                                                                                                                   │
│ /cluster/projects/nn9305k/src/miniconda/envs/nf-core/lib/python3.8/json/decoder.py:355 in raw_decode              │
│                                                                                                                   │
│   354 │   │   except StopIteration as err:                                                                        │
│ ❱ 355 │   │   │   raise JSONDecodeError("Expecting value", s, err.value) from None                                │
│   356 │   │   return obj, end                                                                                     │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I have installed the newest version of nf-core using conda, with python version 3.8.15. I am using Java version 17.0.2.
I have set the NXF_SINGULARITY_CACHE variable in my .bashrc file: export NXF_SINGULARITY_CACHEDIR=${USERWORK}/images
Anyone know why I get this error? Any help is appreciated! (edited)

@ewels ewels added the bug Something isn't working label Dec 13, 2022
@ewels ewels added this to the 2.7.2 milestone Dec 13, 2022
@awgymer
Copy link
Contributor

awgymer commented Dec 14, 2022

That looks like the it's saying the JSON is empty?
You can see what file it is using with verbose logging.

  • Is it actually empty?
  • How did we end up with an empty JSON? (not just {})

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