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

Error when running with --no-report #2198

Closed
4 tasks done
lacek opened this issue Nov 24, 2023 · 1 comment · Fixed by #2212
Closed
4 tasks done

Error when running with --no-report #2198

lacek opened this issue Nov 24, 2023 · 1 comment · Fixed by #2212
Labels
bug: core Bug in the main MultiQC code

Comments

@lacek
Copy link

lacek commented Nov 24, 2023

Description of bug

Example command that triggers the error:

multiqc --no-report stats

When --no-report is given, config.output_fn is None (https://github.com/ewels/MultiQC/blob/v1.18/multiqc/multiqc.py#L676) and therefore the debug statement (https://github.com/ewels/MultiQC/blob/v1.18/multiqc/multiqc.py#L1064) will throw error.

File that triggers the error

Just arbitrary valid input, e.g. a bcftools stats output txt.

MultiQC Error log

/// MultiQC 🔍 | v1.18

|           multiqc | Search path : /runtime/stats
|         searching | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 1/1
|          bcftools | Found 1 stats reports
|           multiqc | Report      : None
|           multiqc | Data        : multiqc_data
Traceback (most recent call last):
  File "/usr/local/bin/multiqc", line 8, in <module>
    sys.exit(run_multiqc())
             ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/multiqc/__main__.py", line 23, in run_multiqc
    multiqc.run_cli(prog_name="multiqc")
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/rich_click/rich_command.py", line 126, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/multiqc/multiqc.py", line 300, in run_cli
    multiqc_run = run(**kwargs)
                  ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/multiqc/multiqc.py", line 1064, in run
    logger.debug("Full report path: {}".format(os.path.realpath(config.output_fn)))
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen posixpath>", line 415, in realpath
TypeError: expected str, bytes or os.PathLike object, not NoneType

Before submitting

  • I have read the troubleshooting documentation.
  • I am using the latest release of MultiQC.
  • I have included a full MultiQC log, not truncated.
  • I have attached an input file (.zip if necessary) that triggers the error.
@vladsavelyev
Copy link
Member

Thank you so much @lacek for creating the bug report, and sorry about this problem!

It should be fixed with #2212

@vladsavelyev vladsavelyev added the bug: core Bug in the main MultiQC code label Dec 4, 2023
@sjclare sjclare mentioned this issue Apr 29, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: core Bug in the main MultiQC code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants