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

Sphinx 2.0.0 'NoneType' object has no attribute 'groupdict' with napoleon #6225

Closed
alertedsnake opened this issue Mar 29, 2019 · 3 comments
Closed

Comments

@alertedsnake
Copy link

alertedsnake commented Mar 29, 2019

Describe the bug
Exception raised when trying to use napoleon with a docstring like this:

Raises:
    :py:class:`MyException`

To Reproduce
Run sphinx-build docs using sphinx.ext.napoleon and `'sphinx.ext.autodoc', using default settings.

$ sphinx-build . out
Running Sphinx v2.0.0
loading intersphinx inventory from http://docs.python.org/3.6/objects.inv...
intersphinx inventory has moved: http://docs.python.org/3.6/objects.inv -> https://docs.python.org/3.6/objects.inv
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: 2 added, 0 changed, 0 removed
reading sources... [ 50%] out/foo                                                                                            
Exception occurred:
  File "/home/michael/test/.venv/lib/python3.6/site-packages/sphinx/ext/napoleon/docstring.py", line 703, in _parse_raises_section
    m = self._name_rgx.match(_type).groupdict()
AttributeError: 'NoneType' object has no attribute 'groupdict'
The full traceback has been saved in /tmp/sphinx-err-gza3ubmq.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!

Expected behavior
No exception

Your project
test.zip

Environment info

  • OS: Linux
  • Python version: 3.6.8
  • Sphinx version: 2.0.0
  • Sphinx extensions: sphinx.ext.autodoc, sphinx.ext.napoleon
  • Extra tools:
@tk0miya
Copy link
Member

tk0miya commented Mar 30, 2019

Thank you for reporting. It seems this would be related with #6220.

@tk0miya tk0miya added this to the 2.0.1 milestone Mar 30, 2019
@alertedsnake
Copy link
Author

@tk0miya yup! Saw that one, but it's a different error so I wasn't sure if it was the same thing or just tangentially related.

tk0miya added a commit to tk0miya/sphinx that referenced this issue Mar 31, 2019
…sed for raised section having references
tk0miya added a commit to tk0miya/sphinx that referenced this issue Mar 31, 2019
…sed for raised section having references
tk0miya added a commit that referenced this issue Apr 4, 2019
Fix #6220, #6225: napoleon: AttributeError is raised for raised section having references
@tk0miya
Copy link
Member

tk0miya commented Apr 4, 2019

Fixed by #6237.
Thank you for reporting!

@tk0miya tk0miya closed this as completed Apr 4, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants