Closed jwflory closed 4 years ago
Same issue here, golang 1.14.2
PS I:\Development-Linux\Go\src\tshoot\docs> sphinx-build -b html . _build Running Sphinx v3.0.3
Extension error: Could not import extension sphinxcontrib_golangdomain (exception: No module named >'sphinxcontrib_golangdomain')
There was a typo in the documentation. The module name should be sphinxcontrib.golangdomain
. Thanks for the report!
This is the error I am getting now with the typo correction:
PS I:\Development-Linux\Go\src\tshoot\docs> sphinx-build -b html . _build
Running Sphinx v3.0.3
Extension error:
Could not import extension sphinxcontrib.golangdomain (exception: cannot import name 'l_' from 'sphinx.locale' (c:\users\jasse\appdata\local\programs\python\python38\lib\site-packages\sphinx\locale\__init__.py))
My init.py
extensions = [
# 'autoapi.extension',
# 'sphinx.ext.autodoc',
# 'sphinx.ext.todo',
# 'sphinx.ext.imgmath',
# 'sphinx.ext.viewcode',
'sphinxcontrib.golangdomain',
]
autoapi_type = 'go'
autoapi_dirs = ['../']
@xXPhenomXx I was able to replicate the same error with Sphinx v3.0.3 too. You need to downgrade to Sphinx v2.4.4.
However, with Sphinx v2.4.4, I get a fatal exception now:
@AWhetter Should I open a new issue for this or do you want to track this bug in this issue?
Continued from #196.
Summary
sphinxcontrib_golangdomain
is not found as an extension when added toconf.py
even when installedBackground
I followed the instructions in the Go tutorial, but when I go to build my docs with
sphinx-build
, this is the output:I tested this with Sphinx 2.4.4 and 3.0.1 and got the same result.
Details
Somehow Sphinx is not finding the extension, even though it is in my
conf.py
file:Not sure if there is more helpful debug output I can provide, but let me know what to do if more verbosity is needed somewhere.
Outcome
Blocks using Sphinx-AutoAPI for Go code