1

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.

2
  • 4
    Post all errors and relevant code here directly as text as an minimal reproducible example. Commented Nov 5, 2019 at 20:22
  • 3
    You have an infinite loop. You have a while True with only one break. Obviously, the break statement is never being executed. Look at the conditions around the break statement and make sure they are correct. Commented Nov 5, 2019 at 20:24

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.