Ask Your Question

building docs with sphinx-1.8.5

asked 2020-04-22 19:30:28 +0200

heluani gravatar image

updated 2020-04-23 04:23:02 +0200

slelievre gravatar image

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 but this is already applied in my branch

 # 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/
#   alabaster (0.7.12) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/alabaster/
#   inventory_builder (unknown version) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/
#   multidocs (unknown version) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/
#   sage_autodoc (1.8.5) from /home/user/Documents/code/sage/sage/src/sage_setup/docbuild/ext/
#   sphinx.ext.graphviz (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/
#   sphinx.ext.inheritance_diagram (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/
#   sphinx.ext.todo (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/
#   sphinx.ext.extlinks (1.8.5) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/
#   IPython.sphinxext.ipython_directive (unknown version) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/IPython/sphinxext/
#   matplotlib.sphinxext.plot_directive (unknown version) from /home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/matplotlib/sphinxext/
Traceback (most recent call last):
  File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/cmd/", line 304, in build_main, filenames)
  File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/", line 369, in build
    self.emit('build-finished', None)
  File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/", line 510, in emit
    return, self, *args)
  File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/", line 80, in emit
  File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/ext/", 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/", line 81, in copy_asset
  File "/home/user/Documents/code/sage/sage/local/lib/python3.7/site-packages/sphinx/util/", line 90, in ensuredir
  File "/home/user/Documents/code/sage/sage/local/lib/python3.7/", 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'
edit retag flag offensive close merge delete


Try deleting /home/user/Documents/code/sage/sage/local/share/doc/sage/html/en/reference/references/_static and try again.

John Palmieri gravatar imageJohn Palmieri ( 2020-04-22 20:44:42 +0200 )edit

Tried 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

heluani gravatar imageheluani ( 2020-04-22 21:12:19 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-04-23 14:52:47 +0200

heluani gravatar image

updated 2020-04-23 15:58:09 +0200

I'll add here the answer I got in sage-support mailing list: running 'make' before 'make clean-doc' solves the problem.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-04-22 19:30:28 +0200

Seen: 382 times

Last updated: Apr 23 '20