astropy / sphinx-automodapi

Sphinx extension for generating API documentation
https://sphinx-automodapi.readthedocs.io
BSD 3-Clause "New" or "Revised" License
65 stars 45 forks source link

automodapi crashing with sphinx 3.1.1 #108

Closed dstansby closed 2 years ago

dstansby commented 4 years ago

Running make html with automodapi and sphinx 3.1.0 or 3.1.1 raises the following error:

GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
Reading makefiles...
Reading makefile `Makefile'...
Updating makefiles....
 Considering target file `Makefile'.
  File `Makefile' does not exist.
  Finished prerequisites of target file `Makefile'.
 Must remake target `Makefile'.
 Successfully remade target file `Makefile'.
Updating goal targets....
Considering target file `html'.
 File `html' does not exist.
 Looking for an implicit rule for `html'.
 Trying pattern rule with stem `html'.
 Trying rule prerequisite `Makefile'.
 Found an implicit rule for `html'.
  Pruning file `Makefile'.
 Finished prerequisites of target file `html'.
Must remake target `html'.
Putting child 0x7f925250a2a0 (html) PID 78900 on the chain.
Live child 0x7f925250a2a0 (html) PID 78900 
Running Sphinx v3.1.1
loading intersphinx inventory from https://docs.python.org/objects.inv...
intersphinx inventory has moved: https://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv

Extension error:
Handler <function process_automodsumm_generation at 0x10c1ac040> for event 'builder-inited' threw an exception
Reaping losing child 0x7f925250a2a0 PID 78900 
make: *** [html] Error 2
Removing child 0x7f925250a2a0 PID 78900 from chain.

Sorry this isn't more helpful - I'm not sure what else to do/debug. Downgrading sphinx to 3.0.4 fixes the issue.

wtbarnes commented 4 years ago

An example of the same failure on CI in the aiapy package: https://gitlab.com/wtbarnes/aiapy/-/jobs/594604251#L92

In this case, we're using tox -e build_docs to invoke sphinx-build.

This is with:

dstansby commented 4 years ago

I've opened https://github.com/sphinx-doc/sphinx/issues/7868 to see if there's a way to get sphinx to print any more useful info to debug this.

dstansby commented 4 years ago

Quick update, not sure what's causing the crash yet, but I've put in a PR to sphinx to fix a bug that was preventing the original error message being displayed.

pllim commented 4 years ago

I see it too on local Debian but not on Travis CI.

pllim commented 4 years ago

I might have found an answer. I installed the missing dependencies required for the package doc to build (for core astropy, see astropy/sphinx-astropy#21) and then the build process got past this cryptic error.

pllim commented 2 years ago

Given that now Sphinx is 4+ and Sphinx 3.x has gone beyond 3.1, I am closing this as won't fix.