Issues

Issue #410 resolved

RuntimeError: unknown xfileref node encountered (rpy docs)

John Owens
created an issue

I'm building the rpy docs using sphinx-build 0.6.5 on OS X from macports. Docs are here:

hg clone https://username@bitbucket.org/lgautier/rpy2

Message is here:

Exception occurred: File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/environment.py", line 1325, in resolve_references % node) RuntimeError: unknown xfileref node encountered: <pending_xref classname modname refcaption="False" refdoc="callbacks" reftarget="rinterface.consoleRead" reftype=""><literal classes="xref">rinterface.consoleRead()</literal></pending_xref> The full traceback has been saved in /var/folders/tI/tIJfPkuHHj0VUt3TaBn9G++++TI/-Tmp-/sphinx-err-SPnXv2.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.

Log file is here in its entirety:

$ less /var/folders/tI/tIJfPkuHHj0VUt3TaBn9G++++TI/-Tmp-/sphinx-err-SPnXv2.log

{{{

!text

Sphinx version: 0.6.5

Docutils version: 0.6 release

Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/cmdline.py", line 170, in main app.build(all_files, filenames) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/application.py", line 136, in build self.builder.build_update() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/builders/init.py", line 260, in build_update self.build(['all'], to_build) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/builders/init.py", line 320, in build self.write(docnames, list(updated_docnames), method) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/builders/latex.py", line 97, in write self.config.latex_appendices or [])) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/builders/latex.py", line 159, in assemble_doctree self.env.resolve_references(largetree, indexfile, self) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/environment.py", line 1325, in resolve_references % node) RuntimeError: unknown xfileref node encountered: <pending_xref classname modname refcaption="False" refdoc="callbacks" reftarget="rinterface.consoleRead" reftype="^@^@^@^@"><literal classes="xref">rinterface.consoleRead()</literal></pending_xref> }}}

Comments (8)

  1. John Owens reporter
    • changed version to 0.6.6

    OK, I now have v0.6.7 installed, here's the complete transcript of how I got the repo and the errors it makes. This is macports's sphinx install on python 2.6. (I didn't build the graphics, but it doesn't matter when I do.)

    $ cd /tmp
    $ hg clone https://www.bitbucket.org/lgautier/rpy2 
    destination directory: rpy2
    requesting all changes
    adding changesets
    adding manifests
    adding file changes
    added 1219 changesets with 2225 changes to 146 files (+4 heads)
    updating to branch default
    87 files updated, 0 files merged, 0 files removed, 0 files unresolved
    $ cd rpy2
    $ hg update -C version_2.1.x
    69 files updated, 0 files merged, 0 files removed, 0 files unresolved
    $ cd doc/
    $ make SPHINXBUILD=sphinx-build-2.6 latex
    sphinx-build-2.6 -b latex -d build/doctrees   source build/latex
    Making output directory...
    Running Sphinx v0.6.7
    loading pickled environment... not found
    building [latex]: all documents
    updating environment: 20 added, 0 changed, 0 removed
    reading sources... [100%] server                                                
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_lattice_xyplot_1.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_lattice_xyplot_2.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_lattice_xyplot_3.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2mtcars.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2mtcarscolcyl.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2aescolsize.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2geomhistogram.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2geomhistogramfillcyl.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2geomfreqpolyfillcyl.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2geombin2d.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2geomboxplot.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2aescolboxplot.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2addsmooth.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2addsmoothmethods.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2smoothbycyl.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2_smoothbycylwithcolours.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2geompointandrug.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2geompointdensity2d.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2map_polygon.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2smoothbycylfacetcyl.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2histogramfacetcyl.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2_qplot_4.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2_qplot_5.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_ggplot2smoothblue.png
    /private/tmp/rpy2/doc/source/graphics.rst:: WARNING: image file not readable: _static/graphics_grid.png
    /private/tmp/rpy2/doc/source/introduction.rst:: WARNING: image file not readable: _static/graphics_ggplot2_smoothbycylwithcolours.png
    looking for now-outdated files... none found
    pickling environment... done
    checking consistency... done
    processing rpy2.tex... index getting-started overview introduction porting-to-rpy2 high-level robjects robjects_convert graphics numpy rinterface rlike miscellaneous callbacks server rpy_classic related_projects performances appendix changes getting-started overview introduction high-level robjects robjects_convert graphics numpy rinterface rlike miscellaneous callbacks server rpy_classic related_projects performances appendix changes 
    resolving references...
    /private/tmp/rpy2/doc/source/porting-to-rpy2.rst:: WARNING: undefined label: missing_values -- if you don't give a link caption the label must precede a section header.
    
    Exception occurred:
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/environment.py", line 1333, in resolve_references
        % node)
    RuntimeError: unknown xfileref node encountered: <pending_xref classname modname refcaption="False" refdoc="callbacks" reftarget="rinterface.consoleRead" reftype=""><literal classes="xref">rinterface.consoleRead()</literal></pending_xref>
    The full traceback has been saved in /var/folders/tI/tIJfPkuHHj0VUt3TaBn9G++++TI/-Tmp-/sphinx-err-kSBYZi.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.
    Either send bugs to the mailing list at <http://groups.google.com/group/sphinx-dev/>,
    or report them in the tracker at <http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!
    make: *** [latex] Error 1
    $ cat /var/folders/tI/tIJfPkuHHj0VUt3TaBn9G++++TI/-Tmp-/sphinx-err-kSBYZi.log 
    # Sphinx version: 0.6.7
    # Docutils version: 0.6 release
    Traceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/cmdline.py", line 170, in main
        app.build(all_files, filenames)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/application.py", line 136, in build
        self.builder.build_update()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/builders/__init__.py", line 260, in build_update
        self.build(['__all__'], to_build)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/builders/__init__.py", line 320, in build
        self.write(docnames, list(updated_docnames), method)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/builders/latex.py", line 97, in write
        self.config.latex_appendices or []))
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/builders/latex.py", line 153, in assemble_doctree
        self.env.resolve_references(largetree, indexfile, self)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/sphinx/environment.py", line 1333, in resolve_references
        % node)
    RuntimeError: unknown xfileref node encountered: <pending_xref classname modname refcaption="False" refdoc="callbacks" reftarget="rinterface.consoleRead" reftype=""><literal classes="xref">rinterface.consoleRead()</literal></pending_xref>
    $ sphinx-build-2.6 --version
    Sphinx v0.6.7
    
  2. Georg Brandl repo owner

    Thanks for the detailed instructions; embarrassingly, I still can't reproduce the exception going through exactly the same steps.

    Since autodoc is used, there might be a difference in the source that gets pulled in -- I built the rpy2 modules from the checkout and set PYTHONPATH to build/lib.linux-i686-2.6. What version of the rpy2 do you have in PYTHONPATH?

  3. John Owens reporter

    I'm installing wholly from MacPorts. Perhaps you can enlist the help of a Mac person to help reproduce (or not)? It's python 2.6.5 with rpy2 version 2.1.2.

    $ python2.6 --version
    Python 2.6.5
    $ which python2.6
    /opt/local/bin/python2.6
    $ python2.6
    Python 2.6.5 (r265:79063, Jun 14 2010, 10:21:16) 
    [GCC 4.2.1 (Apple Inc. build 5659)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import rpy2
    >>> print rpy2.__version__
    2.1.2
    >>> 
    $ port installed | grep python26 | grep 2.6
      python26 @2.6.5_2 (active)
    $ port installed | grep py26-rpy2
      py26-rpy2 @2.1.2_0 (active)
    

    But of course the sphinx run is out of the hg checkout, not the installed version.

  4. Anonymous

    The Sphinx 1.0 release ... works! (on this set of docs). I have no idea what got fixed, but I like it. You can close this out.

  5. Log in to comment