Skip to content

Docs do not build on v0.14.0 #108

Closed
Closed

Description

@QuLogic

There are still a bunch of warnings, but the main thing looks like there's a missing file:

writing output... [  2%] automatic_conversion                                                                                               
Exception occurred:
  File "/usr/lib/python2.7/site-packages/sphinx/jinja2glue.py", line 149, in get_source
    raise TemplateNotFound(template)
TemplateNotFound: sidebartoc.html

Activity

  1. changed the title [-]Docs do not build[/-] [+]Docs do not build on v0.14.0[/+] on Oct 2, 2014
  2. edschofield commented on Oct 2, 2014

    @edschofield
    Contributor

    @QuLogic: thanks for reporting this. This should now be fixed in v0.14.1.

  3. QuLogic commented on Oct 2, 2014

    @QuLogic
    ContributorAuthor

    Yep, looks good.

  4. reopened this on Oct 2, 2014
  5. QuLogic commented on Oct 2, 2014

    @QuLogic
    ContributorAuthor

    OK, I may have spoken too soon. It looks like there are two issues.

    If I run python setup.py build build_sphinx, then Python can't find the future module. I also tried PYTHONPATH=build/lib python setup.py build build_sphinx, but I guess that doesn't work because the directory doesn't yet exists when the interpreter starts. So I tried splitting it in two, build and build_sphinx, but that fails because of 984ae98. Maybe cleaning the build directory should only be done for the build stage, not any others (like install).

    So, I reverted 984ae98, but then I get this problem when building docs:

    Traceback (most recent call last):
      File "setup.py", line 141, in <module>
        **setup_kwds
      File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/lib/python2.7/site-packages/sphinx/setup_command.py", line 143, in run
        app.build(force_all=self.all_files)
      File "/usr/lib/python2.7/site-packages/sphinx/application.py", line 204, in build
        self.builder.build_update()
      File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 196, in build_update
        'out of date' % len(to_build))
      File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 252, in build
        self.write(docnames, list(updated_docnames), method)
      File "/usr/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 292, in write
        self.write_doc(docname, doctree)
      File "/usr/lib/python2.7/site-packages/sphinx/builders/html.py", line 419, in write_doc
        self.docwriter.write(doctree, destination)
      File "/usr/lib/python2.7/site-packages/docutils/writers/__init__.py", line 80, in write
        self.translate()
      File "/usr/lib/python2.7/site-packages/sphinx/writers/html.py", line 38, in translate
        self.document.walkabout(visitor)
      File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 174, in walkabout
        if child.walkabout(visitor):
      File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 174, in walkabout
        if child.walkabout(visitor):
      File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 174, in walkabout
        if child.walkabout(visitor):
      File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 174, in walkabout
        if child.walkabout(visitor):
      File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 166, in walkabout
        visitor.dispatch_visit(self)
      File "/usr/lib/python2.7/site-packages/docutils/nodes.py", line 1882, in dispatch_visit
        return method(node)
      File "/usr/lib/python2.7/site-packages/sphinx/writers/html.py", line 573, in visit_literal_block
        HTMLTranslator.visit_literal_block(self, node)
      File "/usr/lib/python2.7/site-packages/sphinx/writers/html.py", line 249, in visit_literal_block
        **highlight_args)
      File "/usr/lib/python2.7/site-packages/sphinx/highlighting.py", line 172, in highlight_block
        return self.unhighlighted(source)
      File "/usr/lib/python2.7/site-packages/sphinx/highlighting.py", line 108, in unhighlighted
        return '<pre>' + htmlescape(source) + '</pre>\n'
      File "/builddir/build/BUILD/future-0.14.1/build/lib/html/__init__.py", line 30, in escape
        return s.translate(_escape_map_full)
    TypeError: character mapping must return integer, None or unicode
    
  6. edschofield commented on Oct 2, 2014

    @edschofield
    Contributor

    @QuLogic : thanks for the update. I've been using this procedure to build the docs:

    python setup.py install
    cd docs; make html
    

    Can you just install the package before building the docs?

    I wasn't aware of the build_sphinx command to setuptools. Is this from the Sphinx-PyPI-upload plugin? This procedure does seem to work on v0.14.1:

    python setup.py install
    pip install Sphinx-PyPI-upload
    python setup.py build_sphinx
    
  7. QuLogic commented on Oct 2, 2014

    @QuLogic
    ContributorAuthor

    Note, the RPM build procedure usually splits building, testing, and installing. Unless this doesn't work at all (it used to), I'd like to keep it that way.

    I think build_sphinx is automatically added when installing Sphinx. It's in /usr/lib/python2.7/site-packages/Sphinx-1.1.3-py2.7.egg-info/entry_points.txt.

    When I try:

    python setup.py build
    pushd docs
    PYTHONPATH=../build/lib make html
    popd docs
    

    I end up with the second error I posted (though it's a bit shorter).

    PS, there is a --no-build argument to install, so cleaning the build directory unconditionally seems like it would break some things.

  8. edschofield commented on Oct 5, 2014

    @edschofield
    Contributor

    @QuLogic: thanks very much for your testing, feedback, pull requests.

    I have made some changes that allow the docs to be built with either:

    python setup.py build
    PYTHONPATH=build/lib python setup.py build_sphinx
    

    or with your make docs recipe. I'd appreciate further feedback on whether the v0.14.x branch works for you now.

  9. QuLogic commented on Oct 6, 2014

    @QuLogic
    ContributorAuthor

    Looks like it's working correctly now, with either make docs or python setup.py build_sphinx.

  10. edschofield commented on Nov 22, 2014

    @edschofield
    Contributor

    Fixed in v0.14.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions