Code

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13616 closed (fixed)

Sphinx error when building docs using Sphinx 1.0b1

Reported by: hvdklauw Owned by: jezdez
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)

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

Download all attachments as: .zip

Change History (15)

comment:1 Changed 4 years ago by Alex

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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

Changed 4 years ago by andrewsk

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 4 years ago by andrewsk

  • Cc prigun@… added
  • Has patch set

Changed 4 years ago by andrewsk

Fixes DeprecationWarning about xfileref_role

comment:3 follow-up: Changed 4 years ago by lamby

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 ; follow-up: Changed 4 years ago by ramiro

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 4 years ago by ramiro

Path fixing all Sphinx 1.0 compatibility quirks

comment:5 in reply to: ↑ 4 ; follow-up: Changed 4 years ago by richardb

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 4 years ago by jezdez

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 4 years ago by ramiro

comment:7 in reply to: ↑ 5 Changed 4 years ago by ramiro

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 4 years ago by andrewsk

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 4 years ago by jezdez

  • Owner changed from nobody to jezdez

comment:10 Changed 4 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:11 Changed 4 years ago by jezdez

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.