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

Since version 2.4.0 sphinx.ext.autodoc raises TypeError for self.objpath[-1] #7178

Closed
ipaleka opened this issue Feb 18, 2020 · 1 comment
Closed

Comments

@ipaleka
Copy link

ipaleka commented Feb 18, 2020

Describe the bug
Since version 2.4.0 Sphinx raises TypeError in sphinx.ext.autodoc. Everything works fine with <=2.3.1.

  File "/home/ipaleka/dev/venvs/posandpdf/lib/python3.7/site-packages/sphinx/ext/autodoc/__init__.py", line 1427, in add_directive_header
    if self.objpath[-1] in annotations:
TypeError: argument of type 'NoneType' is not iterable

To Reproduce
Steps to reproduce the behavior:

make html  # or any other target

Expected behavior
It should run with only the warnings if any.

Environment info

  • OS: Linux debian 5.4.0-3-amd64 Global citations #1 SMP Debian 5.4.13-1 (2020-01-19) x86_64 GNU/Linux
  • Python version: 3.7.6 (CPython)
  • Sphinx version: v2.4.1
  • Sphinx extensions: sphinx.ext.autodoc

Additional context
Add any other context about the problem here.

sphinx-err-r94n7mzi.log

@ipaleka ipaleka changed the title Since version 2.4.0 sphinx.ext.autodoc raises TypeError Since version 2.4.0 sphinx.ext.autodoc raises TypeError for self.objpath[-1] Feb 18, 2020
@tk0miya tk0miya added this to the 2.4.2 milestone Feb 18, 2020
tk0miya added a commit to tk0miya/sphinx that referenced this issue Feb 18, 2020
tk0miya added a commit to tk0miya/sphinx that referenced this issue Feb 18, 2020
tk0miya added a commit that referenced this issue Feb 18, 2020
Fix #7178: autodoc: TypeError is raised on fetching type annotations
@tk0miya
Copy link
Member

tk0miya commented Feb 18, 2020

Thank you for reporting. Fixed.

@tk0miya tk0miya closed this as completed Feb 18, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 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

2 participants