-
Notifications
You must be signed in to change notification settings - Fork 34
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
Rendering the 404 page causes AttributeError: 'Sphinx' object has no attribute 'get_target_uri' #148
Comments
Hi! Thanks for opening this issue. I took a quick look at this and it seems that for some reason I don't know too much about how the theme works, but I'd say that this line https://github.com/pallets/pallets-sphinx-themes/blob/master/src/pallets_sphinx_themes/versions.py#L132 is not returning what we are expecting (an Sphinx HTML builder) We are overriding the Could you explain a little more what |
@greyli friendly ping :) |
It's been a long time since I looked at this code. That function is called in the Jinja page template to generate a URL to a different version of the docs. It's a bit hazy, but I recall having to be fairly careful about how I generated the URL to account for different Sphinx configurations. In order to generate a URL, I need to call the It's entirely possible I missed something while writing this code the first time. These Sphinx objects, and the way they're called and interact, is essentially undocumented, so I spent quite a lot of time just stepping through with a debugger and finding things that would generate the values I needed. If there had been a way to get a reference to the builder at a different time, I would hopefully have used that, but one way or another I couldn't find that while writing the code. |
Hey, I've just encountered this error again on my end, see https://app.readthedocs.org/projects/flask-utils/builds/24649777 |
Are you still able to reproduce this issue? If so, can you try rebuilding your docs without using this extension? Do you have the same issue? I'm asking because I still don't see this issue related to this extension in particular 🤷🏼 |
Hi, I tried to add sphinx-notfound-page (Version 0.6 or master) for Flask (with Pallets Sphinx Themes).
with the following conf:
then the build failed:
Full build log: https://readthedocs.org/projects/flaskx/builds/13534094/
The error related to this line in Pallets Sphinx Theme. I'm not quite sure if it's an issue of sphinx-notfound-page since I'm not very familiar with Sphinx, any thoughts will be helpful. Thanks!
Related issue: pallets/pallets-sphinx-themes#34
The text was updated successfully, but these errors were encountered: