"ModelLoader Error

Peter
Peter New Altair Community Member
edited November 5 in Community Q&A
Hi,

I try to load a Naive Bayes Model from a .mod-File with ModelLoader, and it returns
Cannot read from XML stream, wrong format: com.rapidminer.operator.learner.bayes.DistributionModel.
Exception: com.rapidminer.operator.UserError
Message: Could not read file 'C:\....\bayes-model-14_1.mod': Cannot read from XML stream, wrong format: com.rapidminer.operator.learner.bayes.DistributionModel.
Stack trace:

 com.rapidminer.operator.io.ModelLoader.read(ModelLoader.java:91)
 com.rapidminer.operator.io.ModelLoader.read(ModelLoader.java:53)
 com.rapidminer.operator.io.AbstractReader.apply(AbstractReader.java:52)
 com.rapidminer.operator.Operator.apply(Operator.java:671)
 com.rapidminer.operator.OperatorChain.apply(OperatorChain.java:424)
 com.rapidminer.operator.Operator.apply(Operator.java:671)
 com.rapidminer.Process.run(Process.java:735)
 com.rapidminer.Process.run(Process.java:704)
 com.rapidminer.Process.run(Process.java:694)
 com.rapidminer.gui.ProcessThread.run(ProcessThread.java:59)

Cause
Exception: java.io.StreamCorruptedException
Message: invalid stream header: 1F8B0800
Stack trace:

 java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
 java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
 com.rapidminer.operator.io.ModelLoader.read(ModelLoader.java:70)
 com.rapidminer.operator.io.ModelLoader.read(ModelLoader.java:53)
 com.rapidminer.operator.io.AbstractReader.apply(AbstractReader.java:52)
 com.rapidminer.operator.Operator.apply(Operator.java:671)
 com.rapidminer.operator.OperatorChain.apply(OperatorChain.java:424)
 com.rapidminer.operator.Operator.apply(Operator.java:671)
 com.rapidminer.Process.run(Process.java:735)
 com.rapidminer.Process.run(Process.java:704)
 com.rapidminer.Process.run(Process.java:694)
 com.rapidminer.gui.ProcessThread.run(ProcessThread.java:59)
Any Ideas on how to load the model?

Thanks
Peter

Tagged:

Answers

  • Peter
    Peter New Altair Community Member
    It works when I use Rapidminer 4.4 instead of 4.5!
    Peter
  • fischer
    fischer New Altair Community Member
    Hi,

    did you generate the model with 4.4 or 4.5? These may be incompatible. Does it work if you save from 4.5 and load into 4.5?

    Cheers,
    Simon
  • Peter
    Peter New Altair Community Member
    I strongly assume I generated it with 4.4, since the date of last change of the file is before the releasedate of 4.5

    Peter