I have an email sender that uses some pictures created in a separate python file and I am trying to implement it into my main code. when it is run by itself it performs all of its attributes and also displays the images that have been put into it as buttons. But when putting the code into the main project I am met with this error:(_tkinter.TclError: image "pyimage9" doesn't exist) even though the tkinter file and the pictures are in the same folder. This is a snippet of the code:
attachImage=PhotoImage(file='attachments.png')
Button(emailLabelFrame,text=' Attachment',image=attachImage,
compound=LEFT,font=('arial',12,'bold'),
cursor='hand2',bd=0,bg='dodger blue2',activebackground='dodger blue2',command=attachment).grid(row=0,column=1)