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

'autodoc-process-docstring' threw an exception (exception: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.) #454

Open
ns-rse opened this issue May 13, 2024 · 0 comments

Comments

@ns-rse
Copy link

ns-rse commented May 13, 2024

I've encountered this exception using the current docutils-0.20.1

[AutoAPI] Adding AutoAPI TOCTree [autoapi/index] to index.rst
/tmp/tmpiodbjbom/d819d1f3d0bed977cdfa926fb309a76a8e394462/docs/autoapi/topostats/tracing/dnatracing/index.rst:368: WARNING: Block quote ends without a blank line; unexpected unindent.
/tmp/tmpiodbjbom/d819d1f3d0bed977cdfa926fb309a76a8e394462/docs/autoapi/topostats/tracing/skeletonize/index.rst:60: WARNING: Inline interpreted text or phrase reference start-string without end-string.
/tmp/tmpiodbjbom/d819d1f3d0bed977cdfa926fb309a76a8e394462/docs/autoapi/topostats/tracing/tracingfuncs/index.rst:215: WARNING: Block quote ends without a blank line; unexpected unindent.
/tmp/tmpiodbjbom/d819d1f3d0bed977cdfa926fb309a76a8e394462/docs/data_dictionary.md:1: WARNING: Document headings start at H2, not H1 [myst.header]

Extension error (sphinx_autodoc_typehints):
Handler <function process_docstring at 0x7d94184b4860> for event 'autodoc-process-docstring' threw an exception (exception: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.)
Traceback (most recent call last):
  File "/home/neil/.virtualenvs/topostats/bin/sphinx-multiversion", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/neil/.virtualenvs/topostats/lib/python3.12/site-packages/sphinx_multiversion/main.py", line 338, in main
    subprocess.check_call(cmd, cwd=current_cwd)
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('/home/neil/.virtualenvs/topostats/bin/python', '-R', '-m', 'sphinx', '-D', 'smv_metadata_path=/tmp/tmpiodbjbom/versions.json', '-D', 'smv_current_version=v2.0.0', '-c', '/home/neil/work/git/hub/AFM-SPM/TopoStats/docs', '/tmp/tmpiodbjbom/d819d1f3d0bed977cdfa926fb309a76a8e394462/docs', '/home/neil/work/git/hub/AFM-SPM/TopoStats/docs/_build/v2.0.0')' returned non-zero exit status 2.

It looks similar to #450 and I think it might be fix-able by updating src/sphinx_autodoc_typehints/__init__.py and importing and using argparse.ArgumentParser instead as indicated, but haven't been able to reconcile docutils.frontend.OptionParser class with argparse.ArgumentParser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants