Opened 16 years ago
Closed 7 years ago
#10539 closed Uncategorized (fixed)
Sphinx error: Could not import extension djangodocs, when running Sphinx >= 0.6
Reported by: | Wiliam Alves de Souza | Owned by: | Karpuscul |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | sphinx 0.6 |
Cc: | wiliamsouza83@…, aribao@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
See error below:
waa@waa:~/svn/django/branches/release/1.0.X/docs$ make html
mkdir -p _build/html _build/doctrees
sphinx-build -b html -d _build/doctrees . _build/html
Running Sphinx v0.6b1
/home/waa/svn/django/branches/release/1.0.X/docs/_ext/djangodocs.py:9: DeprecationWarning: The sphinx.builder module is deprecated; please import builders from the respective sphinx.builders submodules.
import sphinx.builder
Extension error:
Could not import extension djangodocs (exception: No module named htmlwriter)
make: * [html] Error 1
Attachments (2)
Change History (26)
comment:1 by , 16 years ago
comment:4 by , 16 years ago
There is no pressing need to use Sphinx 0.6, 0.5 is supported and can be downloaded and used instead (0.5.2 was released the same day as 0.6) especially considering that Django documentation isn't exposing any Sphinx bug and it doesn't take advantages of new 0.6 features.
I have patches for the code problems, remaining problems seem to be template-related ones (Sphinx 0.6 introduces usage of Jinja 2). If/when I get around these without breaking compatibility with previous Sphinx versions, will upload a patch.
by , 16 years ago
Attachment: | 10539-sphinx06-compatibility.diff added |
---|
comment:5 by , 16 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Attached patch implements changes that make it possible to build the documentation with Sphinx 0.6.1 and maintaining compatibility with Sphinx back to 0.4 (tested using make html
with 0.4, 0.4.3, 0.5.2 and 0.6).
follow-up: 8 comment:6 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
Ramiro,
I can't apply this patch for tests propose if it not in svn diff format! or you can point me some technique to do that without edit the patch manually.
From http://docs.djangoproject.com/en/dev/internals/contributing/?from=olddocs:
Submit patches in the format returned by the svn diff command. An exception is for code changes that are described more clearly in plain English than in code. Indentation is the most common example; it’s hard to read patches when the only difference in code is that it’s indented.
follow-up: 9 comment:8 by , 16 years ago
Replying to waa:
... or you can point me some technique to do that without edit the patch manually.
Sure, just apply it with patch -p1
, it's in Git diff format, generated from Mercurial:
$ ls AUTHORS django docs examples extras INSTALL LICENSE MANIFEST.in README scripts setup.cfg setup.py tests $ cat /path/to/10539-sphinx06-compatibility.diff | patch -p1 patching file docs/_ext/djangodocs.py patching file docs/_templates/layout.html
From http://docs.djangoproject.com/en/dev/internals/contributing/?from=olddocs:
Submit patches in the format returned by the svn diff command. An exception is for code changes that are described more clearly in plain English than in code. Indentation is the most common example; it’s hard to read patches when the only difference in code is that it’s indented.
You forgot to cite the paragraph inmediately next:
Patches in git diff format are also acceptable.
comment:9 by , 16 years ago
Replying to ramiro:
...
Thanks for your attention!!!
I'm really forgot that :(
by , 16 years ago
Attachment: | sphinx.diff added |
---|
comment:11 by , 16 years ago
The latest patch makes a bunch of what appear to be fairly unconditional (non version-dependent) changes. Has it been tested to run with earlier versions of Sphinx? Forcing everybody to upgrade to the latest version isn't cool.
comment:13 by , 16 years ago
Unless I'm completely blind the first patch does what the latest patch does without breaking old versions.
comment:15 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Accepted → Ready for checkin |
Guys,
Just now downloaded sphinx v0.6.1 (the latest official version at this moment), applied ramiro's patch using SVN-diff (just added indexing information to the file to do that), and tested. It works perfectly!
When will it be checked in? It is really needed if you want that users can built Django's documents locally.
Oleg Sakharov.
comment:17 by , 16 years ago
Cc: | added |
---|
comment:18 by , 15 years ago
Summary: | Sphinx error: Could not import extension djangodocs, when running sphinx v0.6b1 → Sphinx error: Could not import extension djangodocs, when running Sphinx >= 0.6 |
---|
comment:19 by , 15 years ago
As it stands, the documentation available at (http://docs.djangoproject.com/en/dev/internals/documentation/#internals-documentation) in regards to building the documentation locally is wrong. With the latest version of Sphinx available from easy_install (0.6.2 at the time of writing), running "make html" will cause it to exit with said error.
However after applying (10539-sphinx06-compatibility.diff), everything works perfectly (at least with Sphinx v0.6.2).
comment:20 by , 15 years ago
milestone: | → 1.1 |
---|
Just confirmed this, 1.1 shouldn't ship with broken docs.
comment:21 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:23 by , 7 years ago
Easy pickings: | unset |
---|---|
Resolution: | fixed |
Severity: | → Normal |
Status: | closed → new |
Type: | → Uncategorized |
UI/UX: | unset |
I'm getting this error with current master branch and Sphinx 1.7.2:
make html
sphinx-build -b djangohtml -n -d _build/doctrees -D language= . _build/html
Running Sphinx v1.7.2
loading translations []... not available for built-in messages
Extension error:
Could not import extension djangodocs (exception: cannot import name 'SmartyPantsHTMLTranslator')
make: * [html] Error 2
comment:24 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Please don't reopen such an old ticket that's been fixed. I can't reproduce your issue and the docs build on the CI server also works fine.
Sphinx v0.6b1 is a beta version, the sphinx developers have planned to release its as a final version soon.
http://groups.google.com/group/sphinx-dev/browse_thread/thread/e00a453922c90b9a