Skip to content

imgconverter eats unrelated exceptions #8938

Closed

Description

@ascended121

Describe the bug

While running sphinx (using verbose flags) and using the sphinx.ext.imgconverter to include an svg image in a Latex document, the following output was observed:

Invoking ['convert', '-version'] ...
WARNING: convert command 'convert' cannot be run, check the image_converter setting

Adding a print to the extension's is_available method revealed that it was a problem that had nothing to do with the extension or Sphinx:

[Errno 12] Cannot allocate memory

Obviously the extension can do nothing about that situation, but it was impossible to tell that from the information provided.

To Reproduce
Run Sphinx with the imgconverter extension with any OS problem which might cause it to not work properly.

Expected behavior
Ideally the extension should only catch exceptions relevant to it. Because that might be very hard to determine, practically it should provide information on what happened so that the user can decide how to resolve the situation.

Your project
N/A

Screenshots
N/A

Environment info

  • OS: Ubuntu 18.04
  • Python version: 3.8.7
  • Sphinx version: 3.4.3
  • Sphinx extensions: sphinx.ext.imgconverter

Activity

  1. added this to the 4.0.0 milestone on Feb 27, 2021
  2. tk0miya commented on Feb 27, 2021

    @tk0miya
    Member

    Thank you for the report. Indeed, exception info will be helpful. Okay, I'll show it in the next version.

  3. added 2 commits that reference this issue on Feb 27, 2021
    347ae4f
    6ca7c1c
  4. added a commit that references this issue on Mar 11, 2021
    3134085
  5. locked as resolved and limited conversation to collaborators on Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions