[Python] python.invalid command name ".!canvas" [duplicate]

Discussão em 'Python' iniciado por Stack, Dezembro 17, 2024.

  1. Stack

    Stack Membro Participativo

    I am making a ping pong game, in the line code ball movement

    ball.goto(ball.xcor() +2, ball.ycor() +2)


    after run the code it appear me this error message

    Exception has occurred: TclError
    invalid command name ".!canvas"
    File "C:\Users\ELNOUR\Desktop\mypython\.idea\pingpong.py\main.py", line 29, in <module>
    ball.goto(ball.xcor() +2, ball.ycor() +2)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    _tkinter.TclError: invalid command name ".!canvas"


    I am trying to make the ball when hits the paddle , the score of the paddle increase and only one because it increase infinit untill I move the paddle

    Continue reading...

Compartilhe esta Página