Ask coding questions

← Back to all posts
RecursionError help
MatthewGookin

Whenever I get to a certain number of clicks, the repl stops and shows the error “RecursionError: maximum recursion depth exceeded while calling a Python object.” How do I fix this?

Answered by ch1ck3n [earned 5 cycles]
View Answer
Comments
hotnewtop
ch1ck3n

a recursionerror is when a function calls itself wayy too many times, and your program does exactly that. every time you click a function calls itself again, and when you click too many times it calls itself to create a recursnioerror. so either you use a while true loop or just make it in javascript

ZetaCommand

If you try importing os at the top and use os.system('clear') instead of replit.clear() it may work.