diff --git a/docs/source/conf.py b/docs/source/conf.py index d967fb4c2..7a43f543f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -295,9 +295,12 @@ import inspect def autodoc_skip_member(app, what, name, obj, skip, options): - if inspect.getmodule(obj).__name__.startswith('telegram') and inspect.isfunction(obj): - if name.lower() != name: - return True + try: + if inspect.getmodule(obj).__name__.startswith('telegram') and inspect.isfunction(obj): + if name.lower() != name: + return True + except AttributeError: + pass # Return None so napoleon can handle it