I have this simple code :
import turtle
s = turtle.Screen()
s.bgcolor('black')
obj = turtle.Turtle()
while True:
s.update()
And when I close the window, this error comes up :
Traceback (most recent call last):
File "d:\Visual Studio Code Projects\SortingAlgorithm1\main.py", line 10, in <module>
s.update()
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\turtle.py", line 1304, in update
t._update_data()
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\turtle.py", line 2647, in _update_data
self.screen._incrementudc()
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\turtle.py", line 1293, in _incrementudc
raise Terminator
turtle.Terminator
Is there a way to prevent this?