Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#13616 closed (fixed)

Sphinx error when building docs using Sphinx 1.0b1

Reported by: Harro Owned by: Jannis Leidel
Component: Documentation Version: dev
Severity: Keywords:
Cc: prigun@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Alex Gaynor)

When using the development version of Sphinx the docs no longer build.

$ make html
sphinx-build -b djangohtml -d _build/doctrees   . _build/html
Running Sphinx v1.0b1
loading pickled environment... not yet created
building [djangohtml]: targets for 187 source files that are out of date
updating environment: 187 added, 0 changed, 0 removed
/Users/hvdklauw/.virtualenvs/djangodev/src/django/docs/_ext/djangodocs.py:91: DeprecationWarning: xfileref_role is deprecated, use XRefRole
  xrefs = sphinx.roles.xfileref_role('ref', linktext, linktext, lineno, state)

Exception occurred:
  File "/Users/hvdklauw/.virtualenvs/djangodev/src/django/docs/_ext/djangodocs.py", line 103, in parse_version_directive
    env.note_versionchange(node['type'], node['version'], node, lineno)
AttributeError: BuildEnvironment instance has no attribute 'note_versionchange'
The full traceback has been saved in /var/folders/+f/+fg+tkaAEP4s9WIWJaIwc++++TI/-Tmp-/sphinx-err-EcMj2N.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: *** [html] Error 1

Attachments (4)

13616_1.diff (1.1 KB ) - added by Andrii Kurinnyi 14 years ago.
Allows to build docs with new Sphinx. It is better to use Sphinx==dev, because Sphinx==1.0b1 throws unicode exception at the end
13616_2.diff (1.6 KB ) - added by Andrii Kurinnyi 14 years ago.
Fixes DeprecationWarning about xfileref_role
13616_3.diff (5.2 KB ) - added by Ramiro Morales 14 years ago.
Path fixing all Sphinx 1.0 compatibility quirks
13616_4.diff (5.7 KB ) - added by Ramiro Morales 14 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 by Alex Gaynor, 14 years ago

Description: modified (diff)
Triage Stage: UnreviewedAccepted

Cleaned up the formatting, please use preview in the future.

by Andrii Kurinnyi, 14 years ago

Attachment: 13616_1.diff added

Allows to build docs with new Sphinx. It is better to use Sphinx==dev, because Sphinx==1.0b1 throws unicode exception at the end

comment:2 by Andrii Kurinnyi, 14 years ago

Cc: prigun@… added
Has patch: set

by Andrii Kurinnyi, 14 years ago

Attachment: 13616_2.diff added

Fixes DeprecationWarning about xfileref_role

comment:3 by Chris Lamb, 14 years ago

Patch is not sufficient for me using sphinx 1.0~b1 due to the removal of BuildEnvionment.reftargets:

dumping search index... done
dumping object inventory... done
writing templatebuiltins.js...

Exception occurred:
  File "/tmp/bp-build/Django-1.2.1/docs.debian/_ext/djangodocs.py", line 285, in finish
    xrefs = self.env.reftargets.keys()
AttributeError: BuildEnvironment instance has no attribute 'reftargets'
The full traceback has been saved in /tmp/sphinx-err-03UAZX.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!

in reply to:  3 ; comment:4 by Ramiro Morales, 14 years ago

Replying to lamby:

Patch is not sufficient for me using sphinx 1.0~b1 due to the removal of BuildEnvionment.reftargets:

Please test 13616_3.diff that fixes issues with in-development Sphinx 1.0 and mainatns compatibility with older versions (tested with Sphing 0.5.2).

by Ramiro Morales, 14 years ago

Attachment: 13616_3.diff added

Path fixing all Sphinx 1.0 compatibility quirks

in reply to:  4 ; comment:5 by Richard Barran, 14 years ago

Replying to ramiro:

Please test 13616_3.diff that fixes issues with in-development Sphinx 1.0 and mainatns compatibility with older versions (tested with Sphing 0.5.2).

Patch does not work for me? Getting same error as lamby:

writing templatebuiltins.js...

Exception occurred:
  File "/Users/richard/workspace/DjangoSVN/trunk/docs/_ext/djangodocs.py", line 295, in finish
    xrefs = self.env.reftargets.keys()
AttributeError: BuildEnvironment instance has no attribute 'reftargets'
etc...

This is with Sphinx v1.0b2.
I notice that patch 13616_3.diff does not include any reference to attribute 'reftargets' which no longer exists in Sphinx according to lamby - is this the correct patch?

comment:6 by Jannis Leidel, 14 years ago

FYI, After talking to Georg at the EuroPython sprint, he gladly reintroduced the note_versionchange method and released it as part of 1.0.

by Ramiro Morales, 14 years ago

Attachment: 13616_4.diff added

in reply to:  5 comment:7 by Ramiro Morales, 14 years ago

Replying to richardb:

Patch does not work for me? Getting same error as lamby:

Sorry, you are right. That part of the build process wasn't being run for me because I hadn't simplejson installed on my virtualenv. Please test the _4 patch.

comment:8 by Andrii Kurinnyi, 14 years ago

There are couple problems with the patch

  1. Links "Please, see the release notes" became not clickable in docs generated with Sphinx 1.0
  2. Reftargets attribute in previous version of Sphinx contained various refs, so 'ttag' and 'tfilter' were extracted, and placed into "templatebuiltins.js" (see r13135). Citations dict on the other hand is empty, so generated "templatebuiltins.js" contains empty lists.


comment:9 by Jannis Leidel, 14 years ago

Owner: changed from nobody to Jannis Leidel

comment:10 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

(In [13445]) [1.2.X] Fixed #13616 - Updated the documentation to be compatible with Sphinx 1.0.

comment:11 by Jannis Leidel, 14 years ago

(In [13446]) Fixed #13616 - Updated the documentation to be compatible with Sphinx 1.0.

Note: See TracTickets for help on using tickets.
Back to Top