Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error from using sphinx.utils.walk #17

Closed
theRealSuperMario opened this issue May 9, 2021 · 1 comment
Closed

Error from using sphinx.utils.walk #17

theRealSuperMario opened this issue May 9, 2021 · 1 comment

Comments

@theRealSuperMario
Copy link
Contributor

theRealSuperMario commented May 9, 2021

Hi,

I was running into the following error

Running Sphinx v4.0.0
making output directory... done
[autosummary] generating autosummary for: XXX

Extension error:
Handler <function run_apidoc at 0x7f83a4aa1550> for event 'builder-inited' threw an exception (exception: cannot import name 'walk' from 'sphinx.util.osutil' (XXX/lib/python3.8/site-packages/sphinx/util/osutil.py))
make: *** [html] Error 2

Turns out the problem comes from import better_apidoc in conf.py. The fix is extremely simple: just don't use the walk from sphinx, but use os.walk.

https://github.com/goerz/better-apidoc/blob/master/better_apidoc.py#L39

As it turns out, sphinx.utils.walk is deprecated anyway. See https://www.sphinx-doc.org/en/master/changes.html#id96.

Do you guys think it is a good idea to fix this?

@goerz
Copy link
Owner

goerz commented May 10, 2021

Definitely! I'll have to make a compatibility update for Sphinx 4.0.

Thanks for reporting, and contributing the fix!

@goerz goerz closed this as completed May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants