При нажатие на кнопку 'Шерлок Холмс' выходит ошибка _tkinter.TclError: image "pyimage1" doesn't exist

from tkinter import * 
import webbrowser as wb

win_enter = Tk()
win_enter.title('Что посмотрет?')
win_enter.geometry('400x500')
win_enter.resizable(False, False)


def movie_func():
    movie_win = Tk()
    movie_win.title('Фильмы')
    movie_win.geometry('500x400')
    movie_win.resizable(False, False)

    def sherlock_holmes():
        tkmovie1 = Tk()
        tkmovie1.geometry('650x310')
        tkmovie1.title('Шерлок Холмс')
        tkmovie1.resizable(False, False)

        def kinopoisk_open():
            wb.open('https://hd.kinopoisk.ru/film/4db90bea36e15d319bd62aafb769f487')


        label_movie1 = Label(tkmovie1, text='Шерлок Холмс', font='Halvetica 14')
        label_movie1.place(x=230, y=10)

        label_info = Label(tkmovie1, text='2009, боевик, приключение, триллер\nСША, Германия, 2 ч. 8 мин. 12+', font='Halvetica 12')
        label_info.place(x=215, y=50)

        label_rating = Label(tkmovie1, text='Рейтинг КиноПоиска: 8.1\nРейтинг IMDb: 7.6\nМировые критики: 6.2', font='Halvetica 12')
        label_rating.place(x=235, y=100)

        button_movie1 = Button(tkmovie1, text='Смотреть на КиноПоиске',font='Halvetica 11' ,width=20, height=2, command=kinopoisk_open)
        button_movie1.place(x=225, y=170)

        canvas = Canvas(tkmovie1, width=200, height=300)
        canvas.place(x=1, y=5)

        sherlock_obj = PhotoImage(file='SherlockHolmes.png')
        canvas.create_image(5, 10, anchor=NW, image=sherlock_obj)

        tkmovie1.mainloop()

    button_movie1 = Button(movie_win,text='Шерлок Холмс', bg='white', fg='black', width=15, command=sherlock_holmes)
    button_movie1.place(x=20, y=10)


    button_movie2 = Button(movie_win,text='Шерлок Холмс:Игра теней', bg='white', fg='black', width=21)
    button_movie2.place(x=140, y=10)

    movie_win.mainloop()




label_enter = Label(text='Чем заняться?', font='Halvetica 12')
label_enter.place(x=140, y=20)

movie = Button(text='Фильмы', bg='white', fg='black', width=15, height=5, command=movie_func)
movie.place(x=20, y=70)

series = Button(text='Сериалы', bg='white', fg='black', width=15, height=5)
series.place(x=140, y=70)

anime = Button(text='Аниме', bg='white', fg='black', width=15, height=5)
anime.place(x=260, y=70)

books = Button(text='Книги', bg='white', fg='black', width=15, height=5)
books.place(x=140, y=160)

movie_marvel = Button(text='Марвел',bg='#ff0000',fg='white', width=15, height=5)
movie_marvel.place(x=20,y=160)

movie_DC = Button(text='DC',bg='#0000b9', fg='black', width=15, height=5)
movie_DC.place(x=260, y=160)

movie_HR = Button(text='Harry Potter',bg='#6a2f06', fg='black', width=15, height=5)
movie_HR.place(x=260,y=250)

movie_ST = Button(text='Star Wars', bg='black', fg='white', width=15, height=5)
movie_ST.place(x=20, y=250)



win_enter.mainloop()

Ответы (0 шт):