After code run showing "'NoneType' object has no attribute 'configure'".How to solve it?

Smita_Mondal: <p>import tkinter<br>
from tkinter import *<br>
from PIL import Image, ImageTk<br>
from random import randint</p>
<p>window = Tk()<br>
window.title(“Game of Rock Paper Scissors”)<br>
window. configure(background=“black”)<br>
window.geometry(‘2000x2000’)</p>
<p>image_rock1= ImageTk.PhotoImage(Image.open(“rock 1.png”))<br>
image_paper1= ImageTk.PhotoImage(Image.open(“paper 1.png”))<br>
image_scissor1= ImageTk.PhotoImage(Image.open(“scissor 1.png”))<br>
image_rock2= ImageTk.PhotoImage(Image.open(“rock 2.png”))<br>
image_paper2= ImageTk.PhotoImage(Image.open(“paper 2.png”))<br>
image_scissor2= ImageTk.PhotoImage(Image.open(“scissor 2.png”))</p>
<p>label_player=Label(window, image=image_scissor1)<br>
label_player=label_player.grid(row=1,column=4)<br>
label_computer=Label(window,image=image_scissor2)<br>
label_computer=label_computer.grid(row=1,column=0)</p>
<p>computer_score= Label(window,text=0,font=(“arial”,50,“bold”),fg=“red”)<br>
player_score= Label(window, text=0, font=(“arial”,50,“bold”),fg=“red”)<br>
computer_score.grid(row=1,column=1)<br>
player_score.grid(row=1,column=3)</p>
<p>computer_indicator=Label(window,font=(“arial”,50,“bold”),<br>
text=“COMPUTER”,bg=“green”,fg=“white”)<br>
computer_indicator.grid(row=0,column=1)</p>
<p>player_indicator=Label(window,font=(“arial”,50,“bold”),<br>
text=“PLAYER”,bg=“green”,fg=“white”)<br>
player_indicator.grid(row=0,column=3)</p>
<p>def updateMessage(a):<br>
final_message[“text”] = a</p>
<p>def computer_update():<br>
final=int(computer_score[“text”])<br>
final=+1<br>
computer_score[“text”]=str(final)</p>
<p>def player_update():<br>
final= int(player_score[“text”])<br>
final=+1<br>
player_score[“text”]=str(final)</p>
<p>def winner_check(p,c):<br>
if p == c:<br>
updateMessage(“It’s a tie”)<br>
elif p==“rock”:<br>
if c == “paper”:<br>
updateMessage(“Computer win!!”)<br>
computer_update()<br>
else:<br>
updateMessage(“Player wins!!”)<br>
player_update()</p>
<pre><code>elif p=="paper":
    if c=="scissor":
        updateMessage("Computer Win!!")
        computer_update()

    else:
        updateMessage("Player Wins!! ")
        player_update()

elif p=="sscissor":
    if c=="rock":
        updateMessage("Computer Wins!!")
        computer_update()
    
    else:
        updateMessage("Player Wins!!")
        player_update()
    
else:
    pass
</code></pre>
<p>to_select=[“rock”,“paper”,“scissor”]</p>
<p>def choice_update(a):</p>
<pre><code>choice_computer = to_select[randint(0,2)]
if choice_computer=="rock":
   label_computer.configure(image=image_rock2)

elif choice_computer=="paper":
   label_computer.configure(image=image_paper2)

elif choice_computer=="scissor":
   label_computer.configure(image=image_scissor2)

if a=="rock":
   label_player.configure(image=image_rock1)

elif a =="paper":
   label_player=label_player.configure(image=image_paper1)

elif a== "scissor":
   label_player=label_player.configure(image=image_scissor2)

winner_check(a,choice_computer)
</code></pre>
<p>final_message=Label(window,font=(“arial”,60,“bold”),bg=“red”,fg=“white”)<br>
final_message.grid(row=3,column=2)</p>
<p>button_rock =Button(window,width= 16,height=3,text=“ROCK”,<br>
font=(“arial”,20,“bold”),<br>
bg= “yellow”, fg =“red”,command=lambda:choice_update(“rock”))<br>
buytton_rock=button_rock.grid(row=2,column=1)</p>
<p>button_paper=Button(window, width=16, height=3, text=“PAPER”,<br>
font=(“arial”,20,“bold”),<br>
bg=“yellow”,fg=“red”,command=lambda:choice_update(“paper”))<br>
button_paper=button_paper.grid(row=2,column=2)</p>
<p>button_scissors=Button(window, width=16, height=3, text=“SCISSORS”,<br>
font=(“arial”,20,“bold”),<br>
bg=“yellow”,fg=“red”,command=lambda:choice_update(“scissor”))<br>
button_scissors=button_scissors.grid(row=2,column=3)</p>
<p>window.mainloop()</p>

ptrblck: <p>Your code doesn’t seem to use PyTorch so you might want to ask the question in another discussion board.</p>