diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py
index 27d92dc..0e4a097 100644
--- a/IPython/core/ultratb.py
+++ b/IPython/core/ultratb.py
@@ -789,7 +789,20 @@ class FrameInfo:
 
     @property
     def lines(self):
-        return self._sd.lines
+        from executing.executing import NotOneValueFound
+
+        try:
+            return self._sd.lines
+        except NotOneValueFound:
+
+            class Dummy:
+                lineno = 0
+                is_current = False
+
+                def render(self, *, pygmented):
+                    return "<Error retrieving source code with stack_data see ipython/ipython#13598>"
+
+            return [Dummy()]
 
     @property
     def executing(self):