error like this:

image.png

image.png

solved: just add “if name == ‘main’”

image.png