Skip to content

sphinx_automodapi.automodsumm doesn't resolve autodoc_mock_imports #148

@NMudunuru

Description

@NMudunuru

I have a python package module that imports 3rd party modules which aren't included in the sphinx documentation. So I added these modules to mock imports in the conf.py

autodoc_mock_imports = ["abaqus", "abaqusConstants","material","section","part","assembly", "step", "interaction","mesh","load","job","optimization","sketch", "odbAccess", "connectorBehavior","pandas","numpy","matplotlib","scipy"]

While using the mock imports works with the sphinx automodule directive without throwing an error.

.. automodule:: mymodule

I get the an error when using the module with automodapi directive.

.. automodapi:: mymodule

Error:

Extension error (sphinx_automodapi.automodsumm):
Handler <function process_automodsumm_generation at 0x0000021867BC5510> for event 'builder-inited' threw an exception (exception: No module named 'abaqus')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions