Skip to content

BUG: 1.2 raises error w.r.t. object has no attribute '__name__' #362

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

Closed
bashtage opened this issue Jan 25, 2022 · 3 comments · Fixed by #363
Closed

BUG: 1.2 raises error w.r.t. object has no attribute '__name__' #362

bashtage opened this issue Jan 25, 2022 · 3 comments · Fixed by #363
Milestone

Comments

@bashtage
Copy link

Just saw in the statsmodels build log

Extension error (numpydoc.numpydoc):
Handler <function mangle_signature at 0x7f0833af8f70> for event 'autodoc-process-signature' threw an exception (exception: 'HuberScale' object has no attribute '__name__')
make: *** [Makefile:39: html] Error 2
Error: Process completed with exit code 2.
@bashtage
Copy link
Author

@rossbar
Copy link
Contributor

rossbar commented Jan 26, 2022

Thanks for reporting - ironically, the path that raises the exception is attempting to provide more detailed information for a UserWarning. This is a bug in numpydoc that arises from the assumption that Callable's always have a __name__ attribute; which was triggered in this case by:

class MyFunction():
    def __init__(self):
        pass
    def __call__(self, *args):
        pass

my_function = MyFunction()

Fortunately, there is an easy fix for the particular instance reported (see statsmodels/statsmodels#8044), but this should be fixed in numpydoc as well.

@bashtage
Copy link
Author

bashtage commented Feb 3, 2022

Thanks for fixing. Was better for us to fix our docs.

@jarrodmillman jarrodmillman added this to the 1.2.1 milestone Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants