Help getting Sphinx setup.

I think I may be doing somthing wrong.

1st my project file strucure looks like this.

Root
├───ComputationClasses
│ └───__pycache__
├───Data
├───DeliveryClasses
│ └───__pycache__
├───DestinationClasses
│ └───__pycache__
├───HashTableClasses
│ ├───HashTablePrettyPrinter
│ │ └───__pycache__
│ └───__pycache__
├───Main
├───PackageClasses
│ └───__pycache__
├───UtilitlesClasses
│ └───__pycache__
├───venv

Next I run Sphinx quick start and go with the defaults?

Welcome to the Sphinx 2.0.0 quickstart utility.

Please enter values for the following settings (just press Enter to
accept a default value, if one is given in brackets).

Selected root path: .

You have two options for placing the build directory for Sphinx output.
Either, you use a directory "_build" within the root path, or you separate
"source" and "build" directories within the root path.
> Separate source and build directories (y/n) [n]: n

The project name will occur in several places in the built documentation.
> Project name: myproject
> Author name(s): myname
> Project release []: 1.1

If the documents are to be written in a language other than English,
you can select a language here by its language code. Sphinx will then
translate text that it generates into that language.

For a list of supported codes, see
http://sphinx-doc.org/config.html#confval-language.
> Project language [en]: en

Creating file .\conf.py.
Creating file .\index.rst.
Creating file .\Makefile.
Creating file .\make.bat.

Finished: An initial directory structure has been created.

You should now populate your master file .\index.rst and create other documentation
source files. Use the Makefile to build the docs, like so:
make builder
where "builder" is one of the supported builders, e.g. html, latex or linkcheck.


Process finished with exit code 0

Next I setup Sphinx like by add debug config like

Then when I try and run the the sphix config I get the error. 

C:\Program Files\JetBrains\PyCharm 2018.3.3\helpers\rest_runners\sphinx_runner.py:16: RemovedInSphinx30Warning: sphinx.cmdline module is deprecated. Use sphinx.cmd.build instead.
cmdline.main(sys.argv)
usage: sphinx_runner.py [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]
sphinx_runner.py: error: cannot find files ['C:\\Users\\admini\\PycharmProjects\\DSII_G\\_build']

 

 

Please let me know if you have any questions!

 

 

 

2 comments
Comment actions Permalink

Hi, 

I believe you're hitting the following issue: https://youtrack.jetbrains.com/issue/PY-35091

Please vote, follow, feel free to leave comments. You can also try the workaround provided there (the modified file), but until the issue is fixed by our developers, I can't guarantee it'll work.

0
Comment actions Permalink

I came here through the sphinx website and issue #4746 (https://github.com/sphinx-doc/sphinx/issues/4746). The check in sphinx runner tests that the version is greater then 1.7 by testing that the major version number is larger then 1 and the minor version number is larger then 7. Sphinx has since been updated and the version number is sitting at 2.2 so the test on the major version number passes but the test on the minor version number fails. Sphinx-Runner subsequently falls back to the sphinx API prior to version 1.7. The following will allow for a more forwards compatible switch over.

if (version[0] >= 1 and version[1] >= 7) or version[0] >= 2 :
from sphinx.cmd import build
build.main(sys.argv[1:])
else:
from sphinx import cmdline
cmdline.main(sys.argv)

(Dang it I just saw there was a ticket for this)

0

Please sign in to leave a comment.