View Single Post
Old 07-04-2017, 10:14 AM   #37
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Now I get:
Code:
*
* Running man_pages
*

	Creating man pages in /home/eschwartz/git/calibre/man-pages for 39 languages...
sphinx-build2 -D language=en -b man -q -Q -d /home/eschwartz/git/calibre/man-pages/doctrees /home/eschwartz/git/calibre/manual /home/eschwartz/git/calibre/man-pages/en


**************** Building translations for: el

Exception occurred:
  File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 2177, in dupname
    node['names'].remove(name)
ValueError: list.remove(x): x not in list
The full traceback has been saved in /tmp/sphinx-err-yj86QF.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
sphinx-build2 -D language=el -b man -q -Q -d /home/eschwartz/git/calibre/man-pages/doctrees /home/eschwartz/git/calibre/manual /home/eschwartz/git/calibre/man-pages/el
Traceback (most recent call last):
  File "/usr/bin/calibre-debug", line 20, in <module>
    sys.exit(main())
  File "/home/eschwartz/git/calibre/src/calibre/debug.py", line 320, in main
    run_script(args[1], args[2:])
  File "/home/eschwartz/git/calibre/src/calibre/debug.py", line 238, in run_script
    execfile(ef, g)
  File "/home/eschwartz/git/calibre/manual/build.py", line 111, in <module>
    build_man_pages(language, base)
  File "/home/eschwartz/git/calibre/manual/build.py", line 83, in build_man_pages
    sphinx_build(language, base, builder='man', bdir=language, very_quiet=True)
  File "/home/eschwartz/git/calibre/manual/build.py", line 38, in sphinx_build
    subprocess.check_call(ans)
  File "/usr/lib/python2.7/subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '[u'sphinx-build2', u'-D', u'language=el', u'-b', u'man', u'-q', u'-Q', u'-d', u'/home/eschwartz/git/calibre/man-pages/doctrees', u'/home/eschwartz/git/calibre/manual', u'/home/eschwartz/git/calibre/man-pages/el']' returned non-zero exit status 1
Code:
# Sphinx version: 1.6.3
# Python version: 2.7.13 (CPython)
# Docutils version: 0.13.1 release
# Jinja2 version: 2.9.6
# Last messages:
#   reading sources... [ 45%] generated/el/ebook-polish
#   reading sources... [ 47%] generated/el/ebook-viewer
#   reading sources... [ 50%] generated/el/fetch-ebook-metadata
#   reading sources... [ 52%] generated/el/lrf2lrs
#   reading sources... [ 54%] generated/el/lrfviewer
#   reading sources... [ 56%] generated/el/lrs2lrf
#   reading sources... [ 58%] generated/el/template_ref
#   reading sources... [ 60%] generated/el/web2disk
#   reading sources... [ 63%] glossary
#   reading sources... [ 65%] gui
# Loaded extensions:
#   sidebar_toc (unknown version) from /home/eschwartz/git/calibre/manual/sidebar_toc.pyc
#   sphinx.ext.viewcode (1.6.3) from /usr/lib/python2.7/site-packages/sphinx/ext/viewcode.pyc
#   custom (unknown version) from /home/eschwartz/git/calibre/manual/custom.pyc
#   sphinx.ext.autodoc (1.6.3) from /usr/lib/python2.7/site-packages/sphinx/ext/autodoc.pyc
#   alabaster (0.7.10) from /usr/lib/python2.7/site-packages/alabaster/__init__.pyc
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sphinx/cmdline.py", line 306, in main
    app.build(opts.force_all, filenames)
  File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 339, in build
    self.builder.build_update()
  File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 326, in build_update
    self.build(['__all__'], to_build)
  File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 344, in build
    updated_docnames = set(self.env.update(self.config, self.srcdir, self.doctreedir))
  File "/usr/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 583, in update
    self._read_serial(docnames, self.app)
  File "/usr/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 602, in _read_serial
    self.read_doc(docname, app)
  File "/usr/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 723, in read_doc
    pub.publish()
  File "/usr/lib/python2.7/site-packages/docutils/core.py", line 218, in publish
    self.apply_transforms()
  File "/usr/lib/python2.7/site-packages/docutils/core.py", line 199, in apply_transforms
    self.document.transformer.apply_transforms()
  File "/usr/lib/python2.7/site-packages/docutils/transforms/__init__.py", line 171, in apply_transforms
    transform.apply(**kwargs)
  File "/usr/lib/python2.7/site-packages/sphinx/transforms/__init__.py", line 187, in apply
    self.document.note_implicit_target(node)
  File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 1383, in note_implicit_target
    self.set_name_id_map(target, id, msgnode, explicit=None)
  File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 1330, in set_name_id_map
    self.set_duplicate_name_id(node, id, name, msgnode, explicit)
  File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 1369, in set_duplicate_name_id
    dupname(node, name)
  File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 2177, in dupname
    node['names'].remove(name)
ValueError: list.remove(x): x not in list
And I have manpages for en, is, and vi.

...

Also, I would appreciate if instead of using 'import init_calibre' you could use the same logic the setup/*.py uses to get at calibre.constants calibre.linux calibre.utils.localization etc. whatever, and don't use calibre-debug for subprocesses. Currently this only works at all if you have already installed calibre to / which means no building manpages until the second time you build calibre.
It dies quite fast with:
Code:
*
* Running man_pages
*

	Creating man pages in /home/eschwartz/git/calibre/man-pages for 39 languages...
Traceback (most recent call last):
  File "setup.py", line 119, in <module>
    sys.exit(main())
  File "setup.py", line 104, in main
    command.run_all(opts)
  File "/home/eschwartz/git/calibre/setup/__init__.py", line 236, in run_all
    self.run_cmd(self, opts)
  File "/home/eschwartz/git/calibre/setup/__init__.py", line 232, in run_cmd
    cmd.run(opts)
  File "/home/eschwartz/git/calibre/setup/publish.py", line 284, in run
    self.build_man_pages(opts.man_dir or 'man-pages', opts.compress_man_pages)
  File "/home/eschwartz/git/calibre/setup/publish.py", line 307, in build_man_pages
    subprocess.check_call(jobs[0][0])
  File "/usr/lib/python2.7/subprocess.py", line 181, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 168, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
eschwartz is offline   Reply With Quote