Issues

Issue #1557 on hold

AttributeError: 'unicode' object has no attribute 'parent'

Anonymous created an issue

Not sure if this is a real issue or not. Traceback is:

# Sphinx version: 1.2.2
# Python version: 2.7.6
# Docutils version: 0.11 release
# Jinja2 version: 2.7.2
# Loaded extensions:
#   sphinx.ext.autodoc from /usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.pyc
#   javasphinx from /usr/local/lib/python2.7/dist-packages/javasphinx/__init__.pyc
#   rst2pdf.pdfbuilder from /usr/local/lib/python2.7/dist-packages/rst2pdf/pdfbuilder.pyc
#   sphinxcontrib.httpdomain from /usr/local/lib/python2.7/dist-packages/sphinxcontrib/httpdomain.py
#   sphinx.ext.pngmath from /usr/lib/python2.7/dist-packages/sphinx/ext/pngmath.pyc
#   sphinx.ext.ifconfig from /usr/lib/python2.7/dist-packages/sphinx/ext/ifconfig.pyc
#   sphinx.ext.oldcmarkup from /usr/lib/python2.7/dist-packages/sphinx/ext/oldcmarkup.pyc
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/sphinx/cmdline.py", line 254, in main
    app.build(force_all, filenames)
  File "/usr/lib/python2.7/dist-packages/sphinx/application.py", line 212, in build
    self.builder.build_update()
  File "/usr/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 214, in build_update
    'out of date' % len(to_build))
  File "/usr/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 276, in build
    self.write(docnames, list(updated_docnames), method)
  File "/usr/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 320, in write
    self._write_serial(sorted(docnames), warnings)
  File "/usr/lib/python2.7/dist-packages/sphinx/builders/__init__.py", line 331, in _write_serial
    doctree = self.env.get_and_resolve_doctree(docname, self)
  File "/usr/lib/python2.7/dist-packages/sphinx/environment.py", line 1113, in get_and_resolve_doctree
    self.resolve_references(doctree, docname, builder)
  File "/usr/lib/python2.7/dist-packages/sphinx/environment.py", line 1388, in resolve_references
    node.replace_self(newnode or contnode)
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 955, in replace_self
    self.parent.replace(self, new)
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 933, in replace
    self[index:index+1] = new
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 586, in __setitem__
    self.setup_child(node)
  File "/usr/lib/python2.7/dist-packages/docutils/nodes.py", line 93, in setup_child
    child.parent = self
AttributeError: 'unicode' object has no attribute 'parent'

Comments (7)

  1. Georg Brandl repo owner

    This may be from httpdomain returning wrong things from its resolver function. Can you check if you have the latest version of httpdomain?

  2. Georg Brandl repo owner

    You could try running sphinx-build with -P and then doing p child at the Pdb prompt to see what the offending string is.

    If that doesn't clarify the problem and you're familiar with Pdb, it would also be interesting to go into the resolve_references stackframe and see what node and newnode or contnode are.

  3. Log in to comment