Join GitHub today
Crasher in doc_resolv, in js_index.loads #287
Scipy-lectures does not build with latest sphinx-gallery and sphinx 1.4.6. A bit of debugging shows that it is when doc_resolv tries to load the js from statsmodels (http://www.statsmodels.org/stable/searchindex.js).
The full traceback is below.
My hunch is that it is because it is trying to load a searchindex.js generated by a different version of sphinx. However, this hypothesis is not that clear, because the code does not crash with scipy (I inserted print statements to figure this out) and both statsmodels documentation and scipy use sphinx 1.5.3.
Currently this implies that latest sphinx-gallery breaks scipy-lectures. It might break other packages. I believe that this is a blocker for a release (I will need to downgrade to continue working).
Maybe the right thing to do would be use the objects.inv, which are related to the intersphinx mechanism, and hence for which sphinx should implement a backward compatibility.
# Sphinx version: 1.4.6 # Python version: 2.7.12+ (CPython) # Docutils version: 0.12 release # Jinja2 version: 2.8 # Last messages: # WARNING: html_static_path entry u'/home/varoquau/dev/scipy-lecture-notes/_static' does not exist # done # copying extra files... # done # dumping search index in English (code: en) ... # done # dumping object inventory... # done # build succeeded, 102 warnings. # embedding documentation hyperlinks in examples... # Loaded extensions: # sphinx.ext.autodoc (1.4.6) from /home/varoquau/.local/lib/python2.7/site-packages/sphinx/ext/autodoc.pyc # sphinx.ext.intersphinx (1.4.6) from /home/varoquau/.local/lib/python2.7/site-packages/sphinx/ext/intersphinx.pyc # sphinx.ext.doctest (1.4.6) from /home/varoquau/.local/lib/python2.7/site-packages/sphinx/ext/doctest.pyc # only_directives (unknown version) from /home/varoquau/dev/scipy-lecture-notes/sphinxext/only_directives.pyc # sphinx.ext.extlinks (1.4.6) from /home/varoquau/.local/lib/python2.7/site-packages/sphinx/ext/extlinks.pyc # plot_directive (unknown version) from /home/varoquau/dev/scipy-lecture-notes/sphinxext/plot_directive.pyc # sphinx_gallery.gen_gallery (unknown version) from /home/varoquau/dev/sphinx-gallery/sphinx_gallery/gen_gallery.pyc # ipython_console_highlighting (unknown version) from /home/varoquau/dev/scipy-lecture-notes/sphinxext/ipython_console_highlighting.pyc # alabaster (0.7.9) from /home/varoquau/.local/lib/python2.7/site-packages/alabaster/__init__.pyc # sphinx.ext.imgmath (1.4.6) from /home/varoquau/.local/lib/python2.7/site-packages/sphinx/ext/imgmath.pyc Traceback (most recent call last): File "/home/varoquau/.local/lib/python2.7/site-packages/sphinx/cmdline.py", line 244, in main app.build(opts.force_all, filenames) File "/home/varoquau/.local/lib/python2.7/site-packages/sphinx/application.py", line 315, in build self.emit('build-finished', None) File "/home/varoquau/.local/lib/python2.7/site-packages/sphinx/application.py", line 551, in emit results.append(callback(self, *args)) File "/home/varoquau/dev/sphinx-gallery/sphinx_gallery/docs_resolv.py", line 383, in embed_code_links _embed_code_links(app, gallery_conf, gallery_dir) File "/home/varoquau/dev/sphinx-gallery/sphinx_gallery/docs_resolv.py", line 266, in _embed_code_links src_gallery_dir) File "/home/varoquau/dev/sphinx-gallery/sphinx_gallery/docs_resolv.py", line 171, in __init__ self._searchindex = js_index.loads(sindex) File "/home/varoquau/.local/lib/python2.7/site-packages/sphinx/search/__init__.py", line 160, in loads return jsdump.loads(data) File "/home/varoquau/.local/lib/python2.7/site-packages/sphinx/util/jsdump.py", line 187, in loads raise ValueError("read error at pos %d" % i) ValueError: read error at pos 498466
referenced this issue
Aug 24, 2017
This would also be better because then the URLs supplied to
When I run
I would definitely think using