I've got a program that uses Pickle to save and load objects from disk. The pickle saving and loading looks like this:
def saveData(self,obj):
f = open(os.path.join(self.directory,obj.name),'wb')
pickle.dump(obj, f)
def loadData(self,fname):
f = open(os.path.join(self.directory,fname),'rb')
ret = pickle.load(f)
return ret
And I have a test method that simply makes an object, saves it, then immediately loads it. In Linux, the object works fine, but in Windows, the program crashes when it tries to load the object. I've re-made the pickled file in Windows, so it isn't trying to open the Linux object dump (although if there's a way to do cross-platform pickling, I would like to know about it)
What could be causing this program to crash in Windows but not Linux?