Ticket #1061 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Unpickled SimpleTreeClassifier fails with an abort trap.

Reported by: ales Owned by: jurezb
Milestone: Future Component: library
Severity: major Keywords:
Cc: Blocking:
Blocked By:


import Orange, pickle
data = Orange.data.Table("iris")
c = Orange.classification.tree.SimpleTreeLearner(data)
c1 = pickle.loads(pickle.dumps(c))

Fails with

tdidt_simple.cpp:770: failed assertion `type == Regression'
Abort trap

It seems the class does not even implement the proper __reduce__ method (and survives the pickle.loads(pickle.dumps(c)) simply because it is default constructable (but left in an unspecified state). At the least it should raise an exception at pickling or unpickling, and not exit the process when used.

Change History

comment:1 Changed 3 years ago by jurezb

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in [f27323012018]

Note: See TracTickets for help on using tickets.