简体   繁体   中英

pyscaffold on Windows 10: Sphinx module documentation not generated

I created a Python project using pyscaffold ( https://pyscaffold.org/ ) on a Windows 10 machine.

When attempting to generate the documentation through the command:

python setup.py docs

the documentation is generated only for .rst files already included in the docs folder, but no documentation is build from the Python source code. No error is reported, just a warning about

Module Reference <api/modules>

saying: "WARNING: document isn't included in any toctree for included file" . To be noted that no .rst file is generated in the api/modules subfolder.

The Sphinx documentation ( at http://howto.nspx.ca/how-to-sphinx.html ) warns that: "On Windows, the sphinx-autobuild live server may have issues with project path with white spaces. In case of error from this command, try to move your project so your fully qualified source path does not contains any white space." .

Indeed my project was located in a subfolder of

C:\Users\User\Documents\Visual Studio 2015\

After some digging, I noticed that the .rst files related to the source code were generated in

C:\Users\User\Documents\Visual\api\modules

So, the problem is definitely related to a white-space in the project's path.

Moving the whole project in a folder whose path has no whitespace (such as:

C:\Users\User\Documents\Projects

) solved the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM