You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a weird bug where adding this extension to a single page app (index.rst without a toctree), pydata-sphinx-theme threw an error. To work around this, I added dummy.rst files to each app in a hidden toctree, which seems silly but did work.
I don't know the best way to fix this - should I PR to pydata-sphinx-theme to throw a reasonable error there if they get a None object? Should we do something in this extension? Any advice is great, I'm happy to make a PR to fix.
Hi,
I found a weird bug where adding this extension to a single page app (index.rst without a toctree), pydata-sphinx-theme threw an error. To work around this, I added
dummy.rst
files to each app in a hidden toctree, which seems silly but did work.I believe the problem comes from this code: https://github.com/readthedocs/sphinx-notfound-page/blob/main/notfound/extension.py#L147-L148 - we return None if there's no toctree here, but when pydata-sphinx-theme tries to consume this, it fails on https://github.com/pydata/pydata-sphinx-theme/blob/fc54589ae964055ea32a9d407fcc812cd77887a8/src/pydata_sphinx_theme/toctree.py#L367 because we've passed it a None object.
I don't know the best way to fix this - should I PR to pydata-sphinx-theme to throw a reasonable error there if they get a None object? Should we do something in this extension? Any advice is great, I'm happy to make a PR to fix.
Ref: openedx-unsupported/edx-documentation#2332
The text was updated successfully, but these errors were encountered: