I’m working on a Python heavy application for inventory (I know, not the most exciting thing Touch can do), which stores class objects using components’ dictionaries; basically everything in inventory is an object, and objects move to different dictionaries depending on what venues they’re in, etc. That’s all good, but if I edit an execute DAT that creates these objects, then save Touch, I get this:
Warning: Error saving storage for operator /project1/container3/workingStock:_pickle.PicklingError: Can’t pickle <class ‘/project1/container3/wStockMgmg/addDevices/chopexec4.DeviceEach’>: it’s not the same object as /project1/container3/wStockMgmg/addDevices/chopexec4.DeviceEach
So I basically understand what this is, that the objects already created can’t be pickled. And right now, that’s not a super big deal, because I’m still developing this, so when I open touch back up, I don’t really care that I lost my inventory. But this could be a really big problem when it comes to updates. So my question is, how do you achieve data persistence? how do you preserve class objects and other parameters through updates?
Also, as a side, and this is beyond the realm of TD… where do objects go? If I’m not mistaken, pickling them stores them on the computer’s drive in byte form. But what if I pickle a bunch of stuff in the command line and then never retrieve it? What if I pickle things in a TD session, and then delete the .toe? are there just objects lost to the computational abyss?