zwang123 / sphinx-autodoc-defaultargs

Automatic generation of default arguments for the Sphinx autodoc extension.
MIT License
4 stars 0 forks source link

exception: no signature found for builtin <method '__reduce__' of 'BaseException' objects> #3

Open ExtremOPS opened 2 years ago

ExtremOPS commented 2 years ago

Hi,

first of all thanks for this nice Sphinx extension.

I am running sphinx-autodoc-defaultargs==0.1.2. We added now a custom Exception into our project and use it at the specific places. Before adding this exception we did not run into any errors. It is not possible to provide easily a small mwe.

If we now run make clean html in our docs folder, we get the following exception:

Extension error (sphinx_autodoc_defaultargs):
Handler <function process_docstring at 0x0000028E4B263E50> for event 'autodoc-process-docstring' threw an exception (exception: no signature found for builtin <method 'with_traceback' of 'BaseException' objects>)
make: *** [Makefile:40: html] Error 2

We can get rid of this exception by setting

autodoc_default_options = {
    ....
    'exclude-members': '....,with_traceback',
}

but then we get the following expetion

Extension error (sphinx_autodoc_defaultargs):
Handler <function process_docstring at 0x0000018D903D3E50> for event 'autodoc-process-docstring' threw an exception (exception: no signature found for builtin <method '__reduce__' of 'BaseException' objects>)
make: *** [Makefile:40: html] Error 2

Setting

autodoc_default_options = {
    ....
    'exclude-members': '....,with_traceback,__reduce__',
}

does not clear the problem.

Do you have any idea how to resolve that?

zwang123 commented 2 years ago

@ExtremOPS Hello!

Thanks for your support and issue. I have to apologize for late response as my github account was lost and it was recovered recently.

I appreciate it for your detailed explanation. However, it would be much easier for me to pinpoint the problem and propose a solution if you could provide a small workable sample for me to reproduce the issue. It is a little difficult to figure it out given the information you provided here.

Looking forward to your further response!