'int' object has no attribute '_getints'

0

Good evening, I'm new to programming, I'm trying to do the following thing, to do a gif in a new window, but I skip the following error. 'int' object has no attribute '_getints'

def Animacion():
    win=Toplevel
    win.minsize(900,300)
    img = PhotoImage(file=".\imagenes\Imagen1.gif")
    can = Canvas(win,width=900, height=300, bg="white")
    contador=1
    x=20
    while True:
        if contador>5: # esto vuelve a iniciar la animación
            contador=1
            nombre=".\imagenes\Imagen"+str(contador)+".gif" # 
        img = PhotoImage(file=nombre)# carga la imagen con su respectivo nombre
        can.create_image(x, 20, image=img, anchor=NW)
        can.pack()
        can.update()
        contador+=1
        x=x+10
        if x>=900:
            x=20
        time.sleep(0.05)
    win.mainloop()
    
asked by Roger Ramírez 05.11.2018 в 04:09
source

0 answers