ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 23 Apr 2020 07:52:47 -0500building docs with sphinx-1.8.5https://ask.sagemath.org/question/50925/building-docs-with-sphinx-185/Hi I'll try this site before asking the developers mailing list. Please let me know if this is the wrong place for this sort of questions.
On my own git branch, after the last pull which happened after arch linux upgraded to sphinx-1.8.5 I hit this error on `sage --docbuild refernce html` even after a `make doc-clean`.
EDIT: this does not have to do with arch's sphinx, even after removing it and using the one shipped with Sage it still fails.
This looks like what's described in this ticket https://trac.sagemath.org/ticket/26451 but this is already applied in my branch
<pre><code>
# Sphinx version: 1.8.5
# Python version: 3.7.3 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.10
# Last messages:
# linking _static directory.
# copying extra files...
# done
# dumping search index in English (code: en) ...
# done
# dumping object inventory...
# done
# build succeeded, 1295 warnings.
#
# The HTML pages are in local/share/doc/sage/html/en/reference/references.
# Loaded extensions:
# sphinx.ext.mathjax (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/mathjax.py
# alabaster (0.7.12) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/alabaster/__init__.py
# inventory_builder (unknown version) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/inventory_builder.py
# multidocs (unknown version) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/multidocs.py
# sage_autodoc (1.8.5) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/sage_autodoc.py
# sphinx.ext.graphviz (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/graphviz.py
# sphinx.ext.inheritance_diagram (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/inheritance_diagram.py
# sphinx.ext.todo (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/todo.py
# sphinx.ext.extlinks (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/extlinks.py
# IPython.sphinxext.ipython_directive (unknown version) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/IPython/sphinxext/ipython_directive.py
# matplotlib.sphinxext.plot_directive (unknown version) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/matplotlib/sphinxext/plot_directive.py
Traceback (most recent call last):
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/cmd/build.py", line 304, in build_main
app.build(args.force_all, filenames)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/application.py", line 369, in build
self.emit('build-finished', None)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/application.py", line 510, in emit
return self.events.emit(event, self, *args)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/events.py", line 80, in emit
results.append(callback(*args))
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/graphviz.py", line 414, in on_build_finished
copy_asset(src, dst)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/util/fileutil.py", line 81, in copy_asset
ensuredir(destination)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/util/osutil.py", line 90, in ensuredir
os.makedirs(path)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/user/Documents/code/sage/sage/local/share/doc/sage/html/en/reference/references/_static'
</code></pre>Wed, 22 Apr 2020 12:30:28 -0500https://ask.sagemath.org/question/50925/building-docs-with-sphinx-185/Comment by heluani for <p>Hi I'll try this site before asking the developers mailing list. Please let me know if this is the wrong place for this sort of questions. </p>
<p>On my own git branch, after the last pull which happened after arch linux upgraded to sphinx-1.8.5 I hit this error on <code>sage --docbuild refernce html</code> even after a <code>make doc-clean</code>. </p>
<p>EDIT: this does not have to do with arch's sphinx, even after removing it and using the one shipped with Sage it still fails. </p>
<p>This looks like what's described in this ticket <a href="https://trac.sagemath.org/ticket/26451">https://trac.sagemath.org/ticket/26451</a> but this is already applied in my branch</p>
<pre><code>
# Sphinx version: 1.8.5
# Python version: 3.7.3 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.10
# Last messages:
# linking _static directory.
# copying extra files...
# done
# dumping search index in English (code: en) ...
# done
# dumping object inventory...
# done
# build succeeded, 1295 warnings.
#
# The HTML pages are in local/share/doc/sage/html/en/reference/references.
# Loaded extensions:
# sphinx.ext.mathjax (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/mathjax.py
# alabaster (0.7.12) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/alabaster/__init__.py
# inventory_builder (unknown version) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/inventory_builder.py
# multidocs (unknown version) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/multidocs.py
# sage_autodoc (1.8.5) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/sage_autodoc.py
# sphinx.ext.graphviz (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/graphviz.py
# sphinx.ext.inheritance_diagram (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/inheritance_diagram.py
# sphinx.ext.todo (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/todo.py
# sphinx.ext.extlinks (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/extlinks.py
# IPython.sphinxext.ipython_directive (unknown version) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/IPython/sphinxext/ipython_directive.py
# matplotlib.sphinxext.plot_directive (unknown version) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/matplotlib/sphinxext/plot_directive.py
Traceback (most recent call last):
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/cmd/build.py", line 304, in build_main
app.build(args.force_all, filenames)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/application.py", line 369, in build
self.emit('build-finished', None)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/application.py", line 510, in emit
return self.events.emit(event, self, *args)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/events.py", line 80, in emit
results.append(callback(*args))
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/graphviz.py", line 414, in on_build_finished
copy_asset(src, dst)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/util/fileutil.py", line 81, in copy_asset
ensuredir(destination)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/util/osutil.py", line 90, in ensuredir
os.makedirs(path)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/user/Documents/code/sage/sage/local/share/doc/sage/html/en/reference/references/_static'
</code></pre>
https://ask.sagemath.org/question/50925/building-docs-with-sphinx-185/?comment=50927#post-id-50927Tried that and fails again with a `[Errno 2] No such file or directory: ...en/reference/objects.inv`.
It looks exactly as was reported in that trac. _static is a symlink to an nonexistent directory. A `make doc-clean` does remove the link. But it gets created during the run of `sage --docbuild reference html`Wed, 22 Apr 2020 14:12:19 -0500https://ask.sagemath.org/question/50925/building-docs-with-sphinx-185/?comment=50927#post-id-50927Comment by John Palmieri for <p>Hi I'll try this site before asking the developers mailing list. Please let me know if this is the wrong place for this sort of questions. </p>
<p>On my own git branch, after the last pull which happened after arch linux upgraded to sphinx-1.8.5 I hit this error on <code>sage --docbuild refernce html</code> even after a <code>make doc-clean</code>. </p>
<p>EDIT: this does not have to do with arch's sphinx, even after removing it and using the one shipped with Sage it still fails. </p>
<p>This looks like what's described in this ticket <a href="https://trac.sagemath.org/ticket/26451">https://trac.sagemath.org/ticket/26451</a> but this is already applied in my branch</p>
<pre><code>
# Sphinx version: 1.8.5
# Python version: 3.7.3 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.10
# Last messages:
# linking _static directory.
# copying extra files...
# done
# dumping search index in English (code: en) ...
# done
# dumping object inventory...
# done
# build succeeded, 1295 warnings.
#
# The HTML pages are in local/share/doc/sage/html/en/reference/references.
# Loaded extensions:
# sphinx.ext.mathjax (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/mathjax.py
# alabaster (0.7.12) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/alabaster/__init__.py
# inventory_builder (unknown version) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/inventory_builder.py
# multidocs (unknown version) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/multidocs.py
# sage_autodoc (1.8.5) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/sage_autodoc.py
# sphinx.ext.graphviz (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/graphviz.py
# sphinx.ext.inheritance_diagram (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/inheritance_diagram.py
# sphinx.ext.todo (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/todo.py
# sphinx.ext.extlinks (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/extlinks.py
# IPython.sphinxext.ipython_directive (unknown version) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/IPython/sphinxext/ipython_directive.py
# matplotlib.sphinxext.plot_directive (unknown version) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/matplotlib/sphinxext/plot_directive.py
Traceback (most recent call last):
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/cmd/build.py", line 304, in build_main
app.build(args.force_all, filenames)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/application.py", line 369, in build
self.emit('build-finished', None)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/application.py", line 510, in emit
return self.events.emit(event, self, *args)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/events.py", line 80, in emit
results.append(callback(*args))
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/graphviz.py", line 414, in on_build_finished
copy_asset(src, dst)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/util/fileutil.py", line 81, in copy_asset
ensuredir(destination)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/util/osutil.py", line 90, in ensuredir
os.makedirs(path)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/user/Documents/code/sage/sage/local/share/doc/sage/html/en/reference/references/_static'
</code></pre>
https://ask.sagemath.org/question/50925/building-docs-with-sphinx-185/?comment=50926#post-id-50926Try deleting `/home/user/Documents/code/sage/sage/local/share/doc/sage/html/en/reference/references/_static` and try again.Wed, 22 Apr 2020 13:44:42 -0500https://ask.sagemath.org/question/50925/building-docs-with-sphinx-185/?comment=50926#post-id-50926Answer by heluani for <p>Hi I'll try this site before asking the developers mailing list. Please let me know if this is the wrong place for this sort of questions. </p>
<p>On my own git branch, after the last pull which happened after arch linux upgraded to sphinx-1.8.5 I hit this error on <code>sage --docbuild refernce html</code> even after a <code>make doc-clean</code>. </p>
<p>EDIT: this does not have to do with arch's sphinx, even after removing it and using the one shipped with Sage it still fails. </p>
<p>This looks like what's described in this ticket <a href="https://trac.sagemath.org/ticket/26451">https://trac.sagemath.org/ticket/26451</a> but this is already applied in my branch</p>
<pre><code>
# Sphinx version: 1.8.5
# Python version: 3.7.3 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.10
# Last messages:
# linking _static directory.
# copying extra files...
# done
# dumping search index in English (code: en) ...
# done
# dumping object inventory...
# done
# build succeeded, 1295 warnings.
#
# The HTML pages are in local/share/doc/sage/html/en/reference/references.
# Loaded extensions:
# sphinx.ext.mathjax (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/mathjax.py
# alabaster (0.7.12) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/alabaster/__init__.py
# inventory_builder (unknown version) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/inventory_builder.py
# multidocs (unknown version) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/multidocs.py
# sage_autodoc (1.8.5) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/sage_autodoc.py
# sphinx.ext.graphviz (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/graphviz.py
# sphinx.ext.inheritance_diagram (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/inheritance_diagram.py
# sphinx.ext.todo (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/todo.py
# sphinx.ext.extlinks (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/extlinks.py
# IPython.sphinxext.ipython_directive (unknown version) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/IPython/sphinxext/ipython_directive.py
# matplotlib.sphinxext.plot_directive (unknown version) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/matplotlib/sphinxext/plot_directive.py
Traceback (most recent call last):
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/cmd/build.py", line 304, in build_main
app.build(args.force_all, filenames)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/application.py", line 369, in build
self.emit('build-finished', None)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/application.py", line 510, in emit
return self.events.emit(event, self, *args)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/events.py", line 80, in emit
results.append(callback(*args))
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/graphviz.py", line 414, in on_build_finished
copy_asset(src, dst)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/util/fileutil.py", line 81, in copy_asset
ensuredir(destination)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/util/osutil.py", line 90, in ensuredir
os.makedirs(path)
File "/home/user/Documents/code/sage/sage/local/lib/python3.7/os.py", line 221, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/home/user/Documents/code/sage/sage/local/share/doc/sage/html/en/reference/references/_static'
</code></pre>
https://ask.sagemath.org/question/50925/building-docs-with-sphinx-185/?answer=50959#post-id-50959I'll add here the answer I got in sage-support mailing list: running 'make' before 'make clean-doc' solves the problem.Thu, 23 Apr 2020 07:52:47 -0500https://ask.sagemath.org/question/50925/building-docs-with-sphinx-185/?answer=50959#post-id-50959