[Matplotlib-devel] 2.1.0: trying to build documentation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Matplotlib-devel] 2.1.0: trying to build documentation

grozin
Hello *,

running ./make.py in doc/ I got

Traceback (most recent call last):
   File "./make.py", line 200, in <module>
     copy_if_out_of_date('../INSTALL.rst', 'users/installing.rst')
   File "./make.py", line 21, in copy_if_out_of_date
     shutil.copyfile(original, derived)
   File "/usr/lib/python2.7/shutil.py", line 96, in copyfile
     with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '../INSTALL.rst'

Right, there's no ../INSTALL.rst. Removed the line
copy_if_out_of_date('../INSTALL.rst', 'users/installing.rst')
from make.py. Then I got

Exception occurred:
   File "/usr/lib64/python2.7/site-packages/sphinx_gallery/gen_gallery.py",
line 217, in generate_gallery_rst
     .format(examples_dir))
IOError: Main example directory
/var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/doc/../tutorials
does not have a README.txt file. Please write one to introduce your
gallery.

Right,there's no ../tutorials. make.py effectively calls

python -msphinx . build/html -j1 -bhtml -dbuild/doctrees
-Dplot_formats=png:100 -W

which produces this error message. Removed all traces of tutorials from
conf.py. Then I got

Warning, treated as error:
/var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/doc/users/index.rst:12:toctree
contains reference to nonexisting document u'users/installing'

Right, now there's no installing. Removed it from users/index.rst. Then I
got some warning treated as an error about some docsttring in matplotlib.
I don't want to edit matplotlib code, so I removed '-W' from options in
the function html in make.py. Now building documentation proceeds rather
far. But at the end I get

copying static files... done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 63 warnings.
Embedding documentation hyperlinks in examples ...
gallery[  0%] index.html
gallery[  0%] 2dcollections3d.html

Exception occurred:
   File "/usr/lib64/python2.7/anydbm.py", line 85, in open
     return mod.open(file, flag, mode)
error: (11, 'Resource temporarily unavailable')
The full traceback has been saved in
/var/tmp/portage/dev-python/matplotlib-2.1.0/temp/sphinx-err-KYVDSp.log,
if you want to report the issue to the developers.

And I don't know what to do next. The log file is:

# Sphinx version: 1.6.3
# Python version: 2.7.14 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.9.6
# Last messages:
#   copying extra files...
#   done
#   dumping search index in English (code: en) ...
#   done
#   dumping object inventory...
#   done
#   build succeeded, 63 warnings.
#   Embedding documentation hyperlinks in examples ...
#   gallery[  0%] index.html
#   gallery[  0%] 2dcollections3d.html
# Loaded extensions:
#   sphinx.ext.inheritance_diagram (1.6.3) from
/usr/lib64/python2.7/site-packages/sphinx/ext/inheritance_diagram.pyc
#   matplotlib.sphinxext.mathmpl (unknown version) from
/var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/build/lib/matplotlib/sphinxext/mathmpl.py
#   matplotlib.sphinxext.only_directives (unknown version) from
/var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/build/lib/matplotlib/sphinxext/only_directives.py
#   IPython.sphinxext.ipython_console_highlighting (unknown version) from
/usr/lib64/python2.7/site-packages/IPython/sphinxext/ipython_console_highlighting.pyc
#   sphinx_gallery.gen_gallery (unknown version) from
/usr/lib64/python2.7/site-packages/sphinx_gallery/gen_gallery.pyc
#   sphinx.ext.autodoc (1.6.3) from
/usr/lib64/python2.7/site-packages/sphinx/ext/autodoc.pyc
#   sphinx.ext.intersphinx (1.6.3) from
/usr/lib64/python2.7/site-packages/sphinx/ext/intersphinx.pyc
#   sphinx.ext.doctest (1.6.3) from
/usr/lib64/python2.7/site-packages/sphinx/ext/doctest.pyc
#   matplotlib.sphinxext.plot_directive (unknown version) from
/var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/build/lib/matplotlib/sphinxext/plot_directive.py
#   alabaster (0.7.10) from
/usr/lib64/python2.7/site-packages/alabaster/__init__.pyc
#   IPython.sphinxext.ipython_directive (unknown version) from
/usr/lib64/python2.7/site-packages/IPython/sphinxext/ipython_directive.pyc
#   sphinxext.math_symbol_table (unknown version) from
sphinxext/math_symbol_table.py
#   sphinxext.github (unknown version) from sphinxext/github.py
#   sphinx.ext.graphviz (1.6.3) from
/usr/lib64/python2.7/site-packages/sphinx/ext/graphviz.pyc
#   numpydoc (unknown version) from
/usr/lib64/python2.7/site-packages/numpydoc/__init__.pyc
#   sphinx.ext.autosummary (1.6.3) from
/usr/lib64/python2.7/site-packages/sphinx/ext/autosummary/__init__.pyc
Traceback (most recent call last):
   File "/usr/lib64/python2.7/site-packages/sphinx/cmdline.py", line 306,
in main
     app.build(opts.force_all, filenames)
   File "/usr/lib64/python2.7/site-packages/sphinx/application.py", line
357, in build
     self.emit('build-finished', None)
   File "/usr/lib64/python2.7/site-packages/sphinx/application.py", line
489, in emit
     return self.events.emit(event, self, *args)
   File "/usr/lib64/python2.7/site-packages/sphinx/events.py", line 79, in
emit
     results.append(callback(*args))
   File "/usr/lib64/python2.7/site-packages/sphinx_gallery/docs_resolv.py",
line 455, in embed_code_links
     _embed_code_links(app, gallery_conf, gallery_dir)
   File "/usr/lib64/python2.7/site-packages/sphinx_gallery/docs_resolv.py",
line 388, in _embed_code_links
     full_fname)
   File "/usr/lib64/python2.7/site-packages/sphinx_gallery/docs_resolv.py",
line 306, in resolve
     link = self._get_link(cobj)
   File "/usr/lib64/python2.7/site-packages/sphinx_gallery/docs_resolv.py",
line 258, in _get_link
     html = get_data(link, self.gallery_dir)
   File "/usr/lib64/python2.7/site-packages/sphinx_gallery/docs_resolv.py",
line 67, in get_data
     search_index = shelve.open(cached_file)
   File "/usr/lib64/python2.7/shelve.py", line 243, in open
     return DbfilenameShelf(filename, flag, protocol, writeback)
   File "/usr/lib64/python2.7/shelve.py", line 227, in __init__
     Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
   File "/usr/lib64/python2.7/anydbm.py", line 85, in open
     return mod.open(file, flag, mode)
error: (11, 'Resource temporarily unavailable')

Any ideas how to proceed?

Does anybody check documentation generation before releases?

Andrey
_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: 2.1.0: trying to build documentation

Antony Lee
Hi,
Indeed the source distribution on PyPI is broken.  I have added the issue to the tracker: https://github.com/matplotlib/matplotlib/issues/9735
In the mean time, your best option is probably to build the docs from a git checkout (from https://github.com/matplotlib/matplotlib).
Antony

2017-11-09 5:47 GMT-08:00 Andrey G. Grozin <[hidden email]>:
Hello *,

running ./make.py in doc/ I got

Traceback (most recent call last):
  File "./make.py", line 200, in <module>
    copy_if_out_of_date('../INSTALL.rst', 'users/installing.rst')
  File "./make.py", line 21, in copy_if_out_of_date
    shutil.copyfile(original, derived)
  File "/usr/lib/python2.7/shutil.py", line 96, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '../INSTALL.rst'

Right, there's no ../INSTALL.rst. Removed the line
copy_if_out_of_date('../INSTALL.rst', 'users/installing.rst')
from make.py. Then I got

Exception occurred:
  File "/usr/lib64/python2.7/site-packages/sphinx_gallery/gen_gallery.py", line 217, in generate_gallery_rst
    .format(examples_dir))
IOError: Main example directory /var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/doc/../tutorials does not have a README.txt file. Please write one to introduce your gallery.

Right,there's no ../tutorials. make.py effectively calls

python -msphinx . build/html -j1 -bhtml -dbuild/doctrees -Dplot_formats=png:100 -W

which produces this error message. Removed all traces of tutorials from conf.py. Then I got

Warning, treated as error:
/var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/doc/users/index.rst:12:toctree contains reference to nonexisting document u'users/installing'

Right, now there's no installing. Removed it from users/index.rst. Then I got some warning treated as an error about some docsttring in matplotlib. I don't want to edit matplotlib code, so I removed '-W' from options in the function html in make.py. Now building documentation proceeds rather far. But at the end I get

copying static files... done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 63 warnings.
Embedding documentation hyperlinks in examples ...
gallery[  0%] index.html
gallery[  0%] 2dcollections3d.html

Exception occurred:
  File "/usr/lib64/python2.7/anydbm.py", line 85, in open
    return mod.open(file, flag, mode)
error: (11, 'Resource temporarily unavailable')
The full traceback has been saved in /var/tmp/portage/dev-python/matplotlib-2.1.0/temp/sphinx-err-KYVDSp.log, if you want to report the issue to the developers.

And I don't know what to do next. The log file is:

# Sphinx version: 1.6.3
# Python version: 2.7.14 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.9.6
# Last messages:
#   copying extra files...
#   done
#   dumping search index in English (code: en) ...
#   done
#   dumping object inventory...
#   done
#   build succeeded, 63 warnings.
#   Embedding documentation hyperlinks in examples ...
#   gallery[  0%] index.html
#   gallery[  0%] 2dcollections3d.html
# Loaded extensions:
#   sphinx.ext.inheritance_diagram (1.6.3) from /usr/lib64/python2.7/site-packages/sphinx/ext/inheritance_diagram.pyc
#   matplotlib.sphinxext.mathmpl (unknown version) from /var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/build/lib/matplotlib/sphinxext/mathmpl.py
#   matplotlib.sphinxext.only_directives (unknown version) from /var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/build/lib/matplotlib/sphinxext/only_directives.py
#   IPython.sphinxext.ipython_console_highlighting (unknown version) from /usr/lib64/python2.7/site-packages/IPython/sphinxext/ipython_console_highlighting.pyc
#   sphinx_gallery.gen_gallery (unknown version) from /usr/lib64/python2.7/site-packages/sphinx_gallery/gen_gallery.pyc
#   sphinx.ext.autodoc (1.6.3) from /usr/lib64/python2.7/site-packages/sphinx/ext/autodoc.pyc
#   sphinx.ext.intersphinx (1.6.3) from /usr/lib64/python2.7/site-packages/sphinx/ext/intersphinx.pyc
#   sphinx.ext.doctest (1.6.3) from /usr/lib64/python2.7/site-packages/sphinx/ext/doctest.pyc
#   matplotlib.sphinxext.plot_directive (unknown version) from /var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/build/lib/matplotlib/sphinxext/plot_directive.py
#   alabaster (0.7.10) from /usr/lib64/python2.7/site-packages/alabaster/__init__.pyc
#   IPython.sphinxext.ipython_directive (unknown version) from /usr/lib64/python2.7/site-packages/IPython/sphinxext/ipython_directive.pyc
#   sphinxext.math_symbol_table (unknown version) from sphinxext/math_symbol_table.py
#   sphinxext.github (unknown version) from sphinxext/github.py
#   sphinx.ext.graphviz (1.6.3) from /usr/lib64/python2.7/site-packages/sphinx/ext/graphviz.pyc
#   numpydoc (unknown version) from /usr/lib64/python2.7/site-packages/numpydoc/__init__.pyc
#   sphinx.ext.autosummary (1.6.3) from /usr/lib64/python2.7/site-packages/sphinx/ext/autosummary/__init__.pyc
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/sphinx/cmdline.py", line 306, in main
    app.build(opts.force_all, filenames)
  File "/usr/lib64/python2.7/site-packages/sphinx/application.py", line 357, in build
    self.emit('build-finished', None)
  File "/usr/lib64/python2.7/site-packages/sphinx/application.py", line 489, in emit
    return self.events.emit(event, self, *args)
  File "/usr/lib64/python2.7/site-packages/sphinx/events.py", line 79, in emit
    results.append(callback(*args))
  File "/usr/lib64/python2.7/site-packages/sphinx_gallery/docs_resolv.py", line 455, in embed_code_links
    _embed_code_links(app, gallery_conf, gallery_dir)
  File "/usr/lib64/python2.7/site-packages/sphinx_gallery/docs_resolv.py", line 388, in _embed_code_links
    full_fname)
  File "/usr/lib64/python2.7/site-packages/sphinx_gallery/docs_resolv.py", line 306, in resolve
    link = self._get_link(cobj)
  File "/usr/lib64/python2.7/site-packages/sphinx_gallery/docs_resolv.py", line 258, in _get_link
    html = get_data(link, self.gallery_dir)
  File "/usr/lib64/python2.7/site-packages/sphinx_gallery/docs_resolv.py", line 67, in get_data
    search_index = shelve.open(cached_file)
  File "/usr/lib64/python2.7/shelve.py", line 243, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "/usr/lib64/python2.7/shelve.py", line 227, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
  File "/usr/lib64/python2.7/anydbm.py", line 85, in open
    return mod.open(file, flag, mode)
error: (11, 'Resource temporarily unavailable')

Any ideas how to proceed?

Does anybody check documentation generation before releases?

Andrey
_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel