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

AttributeError: 'ImportFrom' object has no attribute 'getattr' #500

Open
DanielGuo1 opened this issue Nov 6, 2024 · 0 comments
Open

AttributeError: 'ImportFrom' object has no attribute 'getattr' #500

DanielGuo1 opened this issue Nov 6, 2024 · 0 comments

Comments

@DanielGuo1
Copy link

DanielGuo1 commented Nov 6, 2024

I have seen that the error (AttributeError: ‘ImportFrom’ object has no attribute ‘getattr’) has appeared in earlier versions as well
#193
#289

However, the issue also occurs for me with newer versions (<3.0). Here is the complete log:

# Platform:         win32; (Windows-10-10.0.19045-SP0)
# Sphinx version:   7.3.7
# Python version:   3.12.7 (CPython)
# Docutils version: 0.21.2
# Jinja2 version:   3.1.4
# Pygments version: 2.18.0

# Last messages:
#   writing output...
#   
#   building [html]: targets for 5 source files that are out of date
#   updating environment:
#   [new config]
#   18 added, 0 changed, 0 removed
#   
#   reading sources... [  6%]
#   autoapi/app/ar/index
#   

# Loaded extensions:
#   sphinx.ext.mathjax (7.3.7)
#   alabaster (0.7.16)
#   sphinxcontrib.applehelp (2.0.0)
#   sphinxcontrib.devhelp (2.0.0)
#   sphinxcontrib.htmlhelp (2.1.0)
#   sphinxcontrib.serializinghtml (1.1.10)
#   sphinxcontrib.qthelp (2.0.0)
#   sphinx.ext.autodoc.preserve_defaults (7.3.7)
#   sphinx.ext.autodoc.type_comment (7.3.7)
#   sphinx.ext.autodoc.typehints (7.3.7)
#   sphinx.ext.autodoc (7.3.7)
#   sphinx.ext.napoleon (7.3.7)
#   sphinx_autodoc_typehints (unknown version)
#   sphinx.ext.intersphinx (7.3.7)
#   sphinx.ext.autosummary (7.3.7)
#   sphinx.ext.graphviz (7.3.7)
#   sphinx.ext.inheritance_diagram (7.3.7)
#   autoapi.extension (3.2)
#   sphinx.ext.viewcode (7.3.7)
#   myst_parser (4.0.0)
#   sphinx_book_theme (1.1)
#   pydata_sphinx_theme (0.16.0)

  File "C:\Users\ABC\.conda\envs\project_A\Lib\site-packages\autoapi\inheritance_diagrams.py", line 14, in _do_import_class
    target = (target.getattr(path_part) or (None,))[0]
              ^^^^^^^^^^^^^^
AttributeError: 'ImportFrom' object has no attribute 'getattr'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant