diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py index 98e2cd5..b247529 100644 --- a/IPython/core/ultratb.py +++ b/IPython/core/ultratb.py @@ -438,7 +438,7 @@ def is_recursion_error(etype, value, records): # by stack frames in IPython itself. >500 frames probably indicates # a recursion error. return (etype is recursion_error_type) \ - and "recursion" in str(value).lower() \ + and str("recursion") in str(value).lower() \ and len(records) > 500 def find_recursion(etype, value, records):