sphinx-gallery: [sphinx 1.5] _gdbm.error No such file or directory

@Titan-C It looks like there is still some issues… I updated sphinx-gallery to 0.1.7.

I copy paste the log file. Travis job is here: https://travis-ci.org/scikit-image/scikit-image/jobs/183569010

# Sphinx version: 1.5
# Python version: 3.5.2 (CPython)
# Docutils version: 0.13.1 release
# Jinja2 version: 2.8
# Last messages:
#   
#   copying static files...
#   done
#   copying extra files...
#   done
#   dumping search index in English (code: en) ...
#   done
#   dumping object inventory...
#   done
#   build succeeded.
# Loaded extensions:
#   sphinx.builders.xml (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/xml.py
#   sphinx.builders.html (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/html.py
#   sphinx.domains.python (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/domains/python.py
#   sphinx.builders.latex (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/latex.py
#   sphinx.builders.epub3 (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/epub3.py
#   sphinx.builders.gettext (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/gettext.py
#   sphinx.builders.texinfo (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/texinfo.py
#   sphinx.builders.htmlhelp (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/htmlhelp.py
#   matplotlib.sphinxext.plot_directive (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/matplotlib/sphinxext/plot_directive.py
#   sphinx.ext.linkcode (1.5) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/ext/linkcode.py
#   sphinx.ext.intersphinx (1.5) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/ext/intersphinx.py
#   sphinx.builders.qthelp (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/qthelp.py
#   alabaster (0.7.9) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/alabaster/__init__.py
#   sphinx.domains.javascript (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/domains/javascript.py
#   sphinx.domains.std (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/domains/std.py
#   sphinx.domains.cpp (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/domains/cpp.py
#   sphinx.builders.dummy (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/dummy.py
#   sphinx.builders.changes (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/changes.py
#   sphinx.builders.manpage (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/manpage.py
#   sphinx.roles (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/roles.py
#   sphinx.directives.code (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/directives/code.py
#   sphinx.domains.rst (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/domains/rst.py
#   sphinx.builders.applehelp (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/applehelp.py
#   numpydoc (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/numpydoc/__init__.py
#   sphinx.directives.other (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/directives/other.py
#   sphinx.builders.websupport (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/websupport.py
#   sphinx.domains.c (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/domains/c.py
#   sphinx.directives.patches (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/directives/patches.py
#   sphinx_gallery.gen_gallery (unknown version) from /home/fr/github/scikit-image/doc/source/../ext/sphinx_gallery/gen_gallery.py
#   sphinx.ext.autosummary (1.5) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/ext/autosummary/__init__.py
#   sphinx.ext.autodoc (1.5) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/ext/autodoc.py
#   sphinx.builders.linkcheck (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/linkcheck.py
#   sphinx.directives (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/directives/__init__.py
#   sphinx.builders.devhelp (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/devhelp.py
#   sphinx.builders.epub (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/epub.py
#   sphinx.builders.text (unknown version) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/builders/text.py
#   sphinx.ext.imgmath (1.5) from /home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/ext/imgmath.py
Traceback (most recent call last):
  File "/home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/cmdline.py", line 296, in main
    app.build(opts.force_all, filenames)
  File "/home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/application.py", line 351, in build
    self.emit('build-finished', None)
  File "/home/fr/.local/share/virtualenvs/sk/lib/python3.5/site-packages/sphinx/application.py", line 589, in emit
    results.append(callback(self, *args))
  File "/home/fr/github/scikit-image/doc/source/../ext/sphinx_gallery/docs_resolv.py", line 456, in embed_code_links
    _embed_code_links(app, gallery_conf, gallery_dir)
  File "/home/fr/github/scikit-image/doc/source/../ext/sphinx_gallery/docs_resolv.py", line 343, in _embed_code_links
    gallery_dir)
  File "/home/fr/github/scikit-image/doc/source/../ext/sphinx_gallery/docs_resolv.py", line 214, in __init__
    sindex = get_data(searchindex_url, gallery_dir)
  File "/home/fr/github/scikit-image/doc/source/../ext/sphinx_gallery/docs_resolv.py", line 62, in get_data
    search_index = shelve.open(cached_file)
  File "/usr/lib64/python3.5/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib64/python3.5/shelve.py", line 227, in __init__
    Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
  File "/usr/lib64/python3.5/dbm/__init__.py", line 94, in open
    return mod.open(file, flag, mode)
_gdbm.error: [Errno 2] No such file or directory

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (13 by maintainers)

Most upvoted comments

Why would you like to create a file in source/* during a build procedure? This would go against the idea of the configuration to generate all the files in a separate directory (namely build), no?

I am not sure why but this is definitely what the code is doing. IIRC we are using the default settings in sphinx-start and we don’t have this distinction of build and source folders.

This is what #115 was talking about indeed, @emmanuelle was saying:

I’m wondering if some developers/users have already successfully used sphinx-gallery for projects that have a separate source directory (when you answer “yes” to the following question in sphinx-quickstart " > Separate source and build directories (y/n) [n]: y")

Full disclosure this is the kind of sphinx details that I have no clue about, if you have references that explain this a bit I am interested. It seems like we fixed #115 through a kludge and we need to understand this build/source folder more if we want to support it going forward.