I'm becoming really frustrated because of this problem. I had it before and i fixed it, but it came back again when i changed something in my code. To be precise i'm trying to create multiple instances of a class when i'm pressing a button. I am using python 3.6 with tkinter. When i was first writing my class i was using a rectangle (created by using create_rectangle method) for visual representation. After my class was behaving the way i wanted it to i wanted to use a photo to apear on my canvas instead of the rectangle. As the title sugested my main error is "can't pickle _tkinter.tkapp objects" and before that there are a lot of errors about deepcopy. This is the full error https://pastebin.com/nAQifmnA
Before using an image this fix worked Can't pickle _tkinter.tkapp objects
I forgot to mention, for the image i am using PhotoImage class.
This is where i try to create more instances of the class. This method is inside the actual class, maybe that's the problem? I tried different things but they are not working.
def newAdd():
global And_list
test=AND(10,10)
And_list.append(deepcopy(test))
And_list =listRecord()
def new():inst=Myclass()return inst. Then to create a new one:inst1=new(). (Though I don't see what difference it make with your example....