Skip to content

Could not import extension sphinxcontrib.mermaid (exception: cannot import name 'ExtensionError' from 'sphinx.util' ... #5954

@IHMEkaleb

Description

@IHMEkaleb

Description

When I run sphinx-build with sphinxcontrib.mermaid 0.9.2 and sphinx 8.1.0, I get this error:

sphinx-build /path/to/docs /path/for/build/output
Running Sphinx v8.1.0
loading translations [en]... done

Extension error:
Could not import extension sphinxcontrib.mermaid (exception: cannot import name 'ExtensionError' from 'sphinx.util' (/path/to/my_env/lib/python3.11/site-packages/sphinx/util/__init__.py))

However, with sphinx 8.0.x, it builds fine.

Steps to reproduce

  1. Install sphinxcontrib.mermaid 0.9.2 and sphinx 8.1.0, and add the extension.
  2. Run sphinx-build.
  3. Build fails.

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version: 0.9.2
  • sphinx version: 8.1.0

Suggested Solutions

Maybe find alternative to sphinx.util.ExtensionError?
I don't see any explicit reference to dropping it in the sphinx changelog: https://www.sphinx-doc.org/en/master/changes/index.html

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageNeeds to be verified, categorized, etcType: Bug / ErrorSomething isn't working or is incorrect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions