diff --git a/src/objprint/frame_analyzer.py b/src/objprint/frame_analyzer.py index a3a55ea..3997812 100644 --- a/src/objprint/frame_analyzer.py +++ b/src/objprint/frame_analyzer.py @@ -53,7 +53,7 @@ def get_executing_function_call_str(self, frame: FrameType) -> Optional[str]: if module is None: return None source = inspect.getsource(module) - except OSError: + except (OSError, TypeError): return None return ast.get_source_segment(source, node)