Hi, I’m trying to build the Sphinx Documentation locally. Everything works fine until I serve it. I get an NotImplementedError because of asyncio. After googling this, I found out that there have been some changes made to tornado due to which this error is thrown. I got a fix by including this in the “docserver.py” -
import asyncio
if sys.platform == ‘win32’:
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
There is already an open PR to address the breaking change that Python 3.8 introduced on Windows. For now the simplest thing for you to do is work in a Python 3.7 environment.
Hey Bryan, with your suggestion, I tried building the documentation with Python 3.7.6 and I still get 404 Not Found despite the html files being built. Also, I noticed that the PR was closed so I tried it with the new code on Python 3.8.3 but the issue still persists.
Are you running the doc server by invoking make serve in the sphinx directory? If so, then I am afraid I don’t know. Perhaps some windows-specific issue? I have never run the docserver on windows myself, I am afraid.
No, the issue was that the docserver.py contains a typo in the path. It has build instead of _build. I’ll submit a PR to change this. It works fine now
Ok, I will change that. Also, I noticed that examples aren’t loading. There seems to be no error message in the console as well. What might cause this?
Sorry about that, I meant that the Standalone Examples in the Gallery don’t show up, including the source code for the example too. Only the title is displayed.
We build the docs continuously on Linux on CI jobs, and I build frequently on OSX. I am afraid building docs on Windows is not very explored territory as none of the current core devs are regular users of Windows. I don’t really have any specific suggestions I can offer, it will require some debugging from someone who is a regular Windows user. Some places to look for information:
build directory output
sphinx build logs (can call make SPHINXOPTS=-v ... to increase verbosity)