Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13616 closed (fixed)

Sphinx error when building docs using Sphinx 1.0b1

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

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 6 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 6 years ago.
Fixes DeprecationWarning about xfileref_role
13616_3.diff (5.2 KB) - added by Ramiro Morales 6 years ago.
Path fixing all Sphinx 1.0 compatibility quirks
13616_4.diff (5.7 KB) - added by Ramiro Morales 6 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 6 years ago by Alex Gaynor

Description: modified (diff)
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

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

Changed 6 years ago by Andrii Kurinnyi

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 Changed 6 years ago by Andrii Kurinnyi

Cc: prigun@… added
Has patch: set

Changed 6 years ago by Andrii Kurinnyi

Attachment: 13616_2.diff added

Fixes DeprecationWarning about xfileref_role

comment:3 Changed 6 years ago by Chris Lamb

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!

comment:4 in reply to:  3 ; Changed 6 years ago by Ramiro Morales

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).

Changed 6 years ago by Ramiro Morales

Attachment: 13616_3.diff added

Path fixing all Sphinx 1.0 compatibility quirks

comment:5 in reply to:  4 ; Changed 6 years ago by Richard Barran

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 Changed 6 years ago by Jannis Leidel

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

Changed 6 years ago by Ramiro Morales

Attachment: 13616_4.diff added

comment:7 in reply to:  5 Changed 6 years ago by Ramiro Morales

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 Changed 6 years ago by Andrii Kurinnyi

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 Changed 6 years ago by Jannis Leidel

Owner: changed from nobody to Jannis Leidel

comment:10 Changed 6 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

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

comment:11 Changed 6 years ago by Jannis Leidel

(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