Source

orange-modelmaps / archive / pickleError.py

import pickle
import orange

data = orange.ExampleTable(r"c:\Python26\Lib\site-packages\orange\doc\datasets\primary-tumor.tab")

##############################################################################
## preprocess Data set
transformer = orange.DomainContinuizer()
transformer.multinomialTreatment = orange.DomainContinuizer.NValues
transformer.continuousTreatment = orange.DomainContinuizer.NormalizeBySpan
transformer.classTreatment = orange.DomainContinuizer.Ignore
domain = transformer(data)

classifier = pickle.load(open('classifier.pkl', 'rb'))
pickle.dump(classifier, open('tmp.pkl', "wb"))