-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Broken sidebar when using YAML config, conda, and pip_install #3925
Comments
This might possibly get around readthedocs/readthedocs.org#3925
I can confirm that indeed the problem is that |
I'm pretty sure this mess is caused in part by #3025 |
@goerz I'm facing the same error. A bit confusing, though, because this behaviour was introduced sometimes after 28th of March. You suggest to remove the |
Yes (or rather, from the conda environment file that is referenced in More broadly, if you look at the details of the build process, you'll see that RTD installs the
in https://readthedocs.org/projects/qnet/builds/7008115/ So I think what you want to do is to make sure nothing Sphinx-related is installed by anything in your |
Yes, I thought about that particular conda install line before. I think I need to experiment a bit, since my setup is slightly uncommon. I install all package dependencies via the conda-part of RTD (sphinx, sphinx_rtd_theme, sphinxcontrib-bibtex and nbsphinx included). Here is a good build and bad build. Anyway, I did not change anything in the configuration between these two runs. So something has changed either in rtd or in some other sphinx-related stuff. OK, already long enough here. I'll begin removing |
pip_install on RTD is very buggy. See readthedocs/readthedocs.org#3925 readthedocs/readthedocs.org#3025
This addresses readthedocs/readthedocs.org#3925
I see this is as well here. Any more ideas on how to fix this? I have tried removing sphinx from my part of the conda installation, but I cannot seem to shake it no matter what. In open web inspector I'm getting the error message: |
I did not manage to get around this. For debugging I set up a testing repo with Whereas the
I really appreciate if this can be tracked down quite fast, since this breaks workflow, even on this simple example. |
@kmuehlbauer I've noticed that the build of @goerz that seems to work is using sphinx_rtd_theme version 0.2.4 and no conda-forge. With mine and your latest builds we are using sphinx_rtd_theme 0.3.0 and conda-forge. So it's just the latest version of the theme that seems to be problematic. |
@mikaem Thanks! I'll use |
@mikaem This is a bit weird, while in the last build https://readthedocs.org/projects/debug-docs/builds/7041419/ I explicitely define |
It will be upgraded anyway (https://readthedocs.org/projects/debug-docs/builds/7041427/). 😢 |
Sorry for the ping @humitos. I was searching to find anything related to this problem here and found via a chain of issues and pr this. Interestingly the I'm currently a bit at loss, how to proceed from here. |
@kmuehlbauer for https://readthedocs.org/projects/debug-docs/builds/7041419/, don't include sphinx_rtd_theme in readthedocs_environment.yml. I find that it works if there are no sphinx-related packages installed during any part of processing readthedocs.yml (which includes readthedocs_environment.yml) |
@goerz Thanks for looking into this. I did not inlcude sphinx_rtd_theme into this build. it is automatically installed by rtd themselves. But as @mikaem already suggested, it might have to do with sphinx_rtd_theme version. In your case somehow v0.2.4 is used, while in his and mine v0.3.0 is pulled in. I'm almost convinced now that every new build with conda will break the sidebar, if v0.3.0 of the theme is used.. I therefore tried to get things running without conda. And this worked, because then sphinx_rtd_theme v0.2.4 is installed, see https://readthedocs.org/projects/debug-docs/builds/7041720/. Something is terribly wrong. |
I might be mistaken, but it looks to me like in that particular build you’re using the commit wradlib/debug-docs@d2c5d8e which does have sphinx_rtd_theme listed in the requirements. So it gets installed twice, once from your readthedocs_environment.yml and then again in the line that RTD adds automatically to the build process to install the same package. That’s my whole point: that line that RTD adds is the only place where anything Sphinx-related should be installed. |
Hmm... sorry, wrong commit. So never mind my last comment. And yes, the problem is definitely the version of the sphinx_rtd_theme |
I think they might have changed something on the RTD servers since I opened this issue: If you look at the older (working) build https://readthedocs.org/projects/qnet/builds/7008115/, you'll see that the line that RTD auto-inserts, i.e.
installs version 0.2.4, whereas in your build is install 0.3.0 (which presumably is broken). I've just retriggered a build for the same repo, and I'm still getting 0.2.4. Maybe it has something to do with build caches? If indeed new (clean) builds automatically install 0.3.0, that would imply that RTD just broke all builds using conda. I really wish RTD would limit themselves to provide a well-defined environment, and then simply execute the commands listed in |
@goerz Yes, it seems sphinx_rtd_theme v0.3.0 breaks the sidebar. See also this issue here: #3829 Ping @jakirkham, do you experience broken sidebars in one of your projects rtd docs? |
This does not look like an issue in the theme itself. In the non-working branch http://debug-docs.readthedocs.io/en/conda_pip/ posted by @kmuehlbauer, the code that starts the theme code is This would be fixed by updating the theme code in |
@agjohnson can you take a look here? |
@jessetan Thanks for the explanation. I hope this can be solved somehow. |
@jessetan is correct. To get this working immediately, you should pin the RTD sphinx theme to This is going to be a tricky one to resolve in a backwards compatible way. Here's my initial proposal:
|
Unfortunately, this workaround won't work if you are using Conda because of #3829 :( |
Boooo... Alright. I'll try to get this resolved ASAP. |
Here's the modification to the theme: readthedocs/sphinx_rtd_theme#614 |
@davidfischer Any news on this? As time goes by more and more docs are breaking. |
@kmuehlbauer, the proposed changes are awaiting review. Would you like to try them to see if they fix your issues? |
@davidfischer Sorry, but I do not have issues. And I have no idea how to test the behaviour on rtfd. The sidebar is broken on rtfd on all recent builds using sphinx_rtd_theme 0.3.0. |
I know you are eager to get this fixed but I need to get some reviews of the proposed fix before it is merged. There are folks who will look at this but they are also busy. The more people looking at a particular fix or fixes on RTD in general, the better. If you've never tested Read the Docs locally before, you would need to:
|
@davidfischer Thanks for the pointers. I didn't know that rtd can be setup locally. Definitely worth a try. |
Well, in the meantime, there is a workaround by using the |
@davidfischer Actually, I don't think there currently is any workaround, at least not when using conda. Current broken built where I tried pinning the theme: https://readthedocs.org/projects/qnet/builds/7100055/ At this point, I'm just waiting for your patches to make it into the next release, and onto the RTD servers. The docs are just going to be broken until then. It's not the end of the world. They're still mostly usable. |
@davidfischer I'm with @goerz, it's not the end of the world. Let's wait until this makes into the next release. But, as expected, the more projects get updated, the more reports about broken sidebar/search will find it's way here. Anyway, great service! Keep up the good work. |
@kmuehlbauer, what's the timeline for the next release? I have some documentation that I'm waiting to widely release until the search is fixed. (None of the suggested work-arounds in this thread worked for my case). edited NVM, didn't read far enough up the comment chain, thought you were one of the devs! Sorry about that. |
…inx-rtd-theme == 0.3.0 (see readthedocs/readthedocs.org#3925)
…en using sphinx-rtd-theme == 0.3.0 (see readthedocs/readthedocs.org#3925 and readthedocs/readthedocs.org#4020)
Believe this should be fixed with our latest deploy. |
Confirmed that this works again :) Thanks! |
I added readthedocs/sphinx_rtd_theme#623, which addressed backwards incompatibility in the 0.3.0 release. 0.3.1 was released this morning and RTD was patched last night. You shouldn't have a problem building your projects with 0.3.0 and 0.3.1 now, and we have a more permanent fix coming soon. Closing this for now, but reopen if you are still having trouble! |
I can't seem to get it to work for me, it looks like it's still grabbing v0.3.0 of the sphinx_rtd_theme, is that the problem? I tried clearing the build config a few times before restarting it. Currently trying to mess with forcing an update to 0.3.1 somehow in another branch. build: https://readthedocs.org/projects/stak-notebooks/builds/7135343/
|
@SaOgaz the rtd sidebar works as expected on your project for me, what is the issue? About the old version, maybe something to do with the |
What the what, it's working now. I wonder if my browser was pulling up a cached version somehow.... whoo, ignore my previous comments. Thanks rtd! |
Since conda uses other channels, it takes some time to update when a new release is done |
I'm seeing a strange effect where the navigation sidebar is broken depending on the RTD configuration. The effect is that clicking on the "Read the Docs"/version at the very bottom of the sidebar does nothing (it should pop up the version selector). Also, on a small screen where the sidebar is hidden by default, clicking on the sidebar button (the symbol of three horizontal bars in the top left corner) has no effect (as opposed to showing the sidebar).
The broken behavior can be seen in the current build on the Project URL. When loading that page e.g. in Safari with an open Web Inspector, there is an error message that hints at the problem:
The project uses a readthedocs.yml file and it's set up to use conda, and also to install the package for which the documentation is generated via pip (
pip_install: true
)It turns out that this is the problem. If I switch from
pip_install
tosetup_py_install
(and adapt the environment.yml file accordingly to install all pip-prerequisites manually), it works fine.The commit that makes everything work is mabuchilab/QNET@cc55fe4
I've reverted that commit to have a "broken" build, which I'll leave up for a few days to give people a chance to look at it.
I wonder if the problem is that I have
sphinx_rtd_theme
listed insetup.py
: maybe this overwrites the system-sphinx-rtd_theme
during thepip_install
of the package, which doesn't happen withsetup_py_install
?The text was updated successfully, but these errors were encountered: