Skip to content
Advertisement

Fatal Python error: Cannot recover from stack overflow. In python

I was trying to make my own terminal and when I was adding the feature to make your own functions and use them I got this error:

Fatal Python error: Cannot recover from stack overflow.

EDIT: For everyone looking for help with a similar error, this problem is caused by a function calling itself too many times. That causes an error because python is so far deep into running the function over and over and over again.

Advertisement

Answer

The error you’re getting indicates that you have a function called do which calls itself, probably in an infinite loop. When a function does that too many times (calls itself inside itself, which causes it to call itself inside itself inside itself…) you get what’s called a “stack overflow”.

If you don’t do that, you won’t get this error.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement