-
Notifications
You must be signed in to change notification settings - Fork 133
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
Extension error: list index out of range #412
Comments
Popping the first child off the diff --git a/autoapi/directives.py b/autoapi/directives.py
index ee5e3ec..fb6caa2 100644
--- a/autoapi/directives.py
+++ b/autoapi/directives.py
@@ -61,7 +61,7 @@ class NestedParse(Directive):
try:
title_node = node[0][0]
if isinstance(title_node, nodes.title):
- del node[0][0]
+ title_node.children.pop(0)
except IndexError:
pass
return node.children |
That sounds like a good fix to me! |
I am experiencing the same error when building the documentation for karney package: https://readthedocs.org/projects/karney/builds/23394851/ Any chance it can be fixed in the next release? |
Fixed in c4db7eb |
Hi, when is thew version planned to be released? |
👋 Hello!
When trying to build documentation for my project using sphinx-autoapi, I'm getting the following error,
After digging around a bit, it appears the problem may lie in
NestedParse
when it removes a heading. Although the title node is removed withdel node[0][0]
, perhaps the number of nodes is not decremented somewhere, which causes sphinx to try to iterate beyond the end of the list?Anyway, below is a minimal reproducible example that produces the error (for me, anyway).
Running the following generates the above error,
If I either remove the heading in
foobar/foo.py
or remove thedel node[0][0]
line fromNestedParse
, the error goes away and the docs build successfully.I'm using sphinx-autoapi v3.0.0 and sphinx v7.2.6.
Any ideas? Am I missing something?
Thanks!
The text was updated successfully, but these errors were encountered: