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

AttributeError: 'Sphinx' object has no attribute 'override_domain' #4

Open
misakadam97 opened this issue Dec 31, 2022 · 2 comments
Open

Comments

@misakadam97
Copy link

Exception occurred:
File "/home/miska/repos/statmech/source/numsec.py", line 50, in setup
app.override_domain(CustomStandardDomain)
AttributeError: 'Sphinx' object has no attribute 'override_domain'

works w/:
app.add_domain(CustomStandardDomain, override=True)

@peastman
Copy link
Owner

peastman commented Jan 2, 2023

You probably need to use an older version of Sphinx. It's been a long time since I generated the text. I used 1.3.1 at the time. An update since then has probably broken compatibility.

@djoshea
Copy link

djoshea commented Mar 14, 2024

FYI, the only change this required to use Sphinx 5.3.0 was to edit source/numsec.py:

def setup(app):
-    app.override_domain(CustomStandardDomain)
+    app.add_domain(CustomStandardDomain, override=True)
    app.connect('doctree-resolved', doctree_resolved)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants