sphinx-autoapi icon indicating copy to clipboard operation
sphinx-autoapi copied to clipboard

Error 'TreeRebuilder' object has no attribute 'visit_typealias'

Open rlaugier opened this issue 6 months ago • 2 comments

Hi, I am trying to use autoapi to document my new package nifits, but it seems to fail spectacularly.

Error message is

Extension error (autoapi.extension):
Handler <function run_autoapi at 0x7f40209360c0> for event 'builder-inited' threw an exception (exception: 'TreeRebuilder' object has no attribute 'visit_typealias')

I have no idea what gives rise to this. I tried many things:

  • Building the doc for [https://github.com/readthedocs/sphinx-autoapi] which works, meaining my environment for sphinx seems ok.
  • running on heach halves of my source base, which both lead to this error (minus the syntaxwarning).
  • removing any combination of extensions from my conf.py which doesn't change the outcome.
  • regenerating removing my docs/ directory and making it from scratch with sphinx-quickstart. It starts failing when using extension autoapi. (also -E option does not seem to affect the output).

Here is the output I obtained.

$sphinx-build -b html -E ./source _build
Running Sphinx v7.3.7
WARNING: VerifyWarning: Keyword name 'MOD_PHAS_UNITS' is greater than 8 characters or contains characters not allowed by the FITS standard; a HIERARCH card will be created. [astropy.io.fits.card]
WARNING: VerifyWarning: Keyword name 'ARRCOL_UNITS' is greater than 8 characters or contains characters not allowed by the FITS standard; a HIERARCH card will be created. [astropy.io.fits.card]
WARNING: VerifyWarning: Keyword name 'FOV_offset' is greater than 8 characters or contains characters not allowed by the FITS standard; a HIERARCH card will be created. [astropy.io.fits.card]
WARNING: VerifyWarning: Keyword name 'FOV_TELDIAM' is greater than 8 characters or contains characters not allowed by the FITS standard; a HIERARCH card will be created. [astropy.io.fits.card]
WARNING: VerifyWarning: Keyword name 'FOV_TELDIAM_UNIT' is greater than 8 characters or contains characters not allowed by the FITS standard; a HIERARCH card will be created. [astropy.io.fits.card]
WARNING: VerifyWarning: Keyword name 'WL_SHIFT_MODE' is greater than 8 characters or contains characters not allowed by the FITS standard; a HIERARCH card will be created. [astropy.io.fits.card]
/lhome/romain/miniconda3/envs/aiitec2/lib/python3.12/site-packages/sphinxcontrib/applehelp/__init__.py:24: RemovedInSphinx80Warning: The alias 'sphinx.util.SkipProgressMessage' is deprecated, use 'sphinx.util.display.SkipProgressMessage' instead. Check CHANGES for Sphinx API modifications.
  from sphinx.util import SkipProgressMessage, progress_message
/lhome/romain/miniconda3/envs/aiitec2/lib/python3.12/site-packages/sphinxcontrib/applehelp/__init__.py:24: RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.util.display.progress_message' instead. Check CHANGES for Sphinx API modifications.
  from sphinx.util import SkipProgressMessage, progress_message
/lhome/romain/miniconda3/envs/aiitec2/lib/python3.12/site-packages/sphinxcontrib/htmlhelp/__init__.py:26: RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.util.display.progress_message' instead. Check CHANGES for Sphinx API modifications.
  from sphinx.util import progress_message
<unknown>:126: SyntaxWarning: invalid escape sequence '\c'i5/aiitec/nifits/nifits/nifits/io/oifits.py

Extension error (autoapi.extension):
Handler <function run_autoapi at 0x7f40209360c0> for event 'builder-inited' threw an exception (exception: 'TreeRebuilder' object has no attribute 'visit_typealias')

I concluded that autoapi has problems with my source base, but I have no idea of what sort. Could you help me figure it out based on the error I obtain? Thanks in advance.

rlaugier avatar Aug 07 '24 17:08 rlaugier