title: Pyweka Error loading a Model, weka.filters.supervised.instance.RUS
body: <p>I'm trying to load a weka model for pyweka but while I do:</p>
  <pre><code>clsfile = &quot;/home/pablo/Escritorio/TFG/Bases de Datos, Modelos y Esquemas/modelo 2 CSE CS UBAG ADtree.model&quot;
  Model_1_2 = Classifier(jobject=serialization.read(clsfile))
  </code></pre>
  <p>And this model use the class weka.filters.supervised.instance.Rus
  but when I try to execute it I receive this error:</p>
  <pre><code>Exception in thread &quot;Thread-0&quot; java.lang.ClassNotFoundException: Unable to find class weka.filters.supervised.instance.RUS
      weka.core.SerializationHelper$1.resolveClass(SerializationHelper.java:363)
      java.base/java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1997)
      java.base/java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1864)
      java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2195)
      java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1681)
      java.base/java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2490)
      java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2384)
      java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2222)
      java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1681)
      java.base/java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2490)
      java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2384)
      java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2222)
      java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1681)
      java.base/java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2490)
      java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2384)
      java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2222)
      java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1681)
      java.base/java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2490)
      java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2384)
      java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2222)
      java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1681)
      java.base/java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2490)
      java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2384)
      java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2222)
      java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1681)
      java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:493)
      java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:451)
      weka.core.SerializationHelper.read(SerializationHelper.java:278)
      weka.core.SerializationHelper.read(SerializationHelper.java:263)
  ---------------------------------------------------------------------------
  JavaException                             Traceback (most recent call last)
  /tmp/ipykernel_22791/3838490355.py in &lt;module&gt;
        1 clsfile = &quot;/home/pablo/Escritorio/TFG/Bases de Datos, Modelos y Esquemas/modelo 2 CSE CS UBAG ADtree.model&quot;
  ----&gt; 2 Model_1_2 = Classifier(jobject=serialization.read(clsfile))
        3 
        4 print(Model_1_2)
  
  ~/.local/lib/python3.8/site-packages/weka/core/classes.py in serialization_read(filename)
       71     :rtype: JB_Object
       72     &quot;&quot;&quot;
  ---&gt; 73     return javabridge.static_call(
       74         &quot;Lweka/core/SerializationHelper;&quot;, &quot;read&quot;,
       75         &quot;(Ljava/lang/String;)Ljava/lang/Object;&quot;,
  
  ~/.local/lib/python3.8/site-packages/javabridge/jutil.py in static_call(class_name, method_name, sig, *args)
      941     ret_sig = sig[sig.find(')')+1:]
      942     nice_args = get_nice_args(args, args_sig)
  --&gt; 943     result = fn(*nice_args)
      944     return get_nice_result(result, ret_sig)
      945 
  
  ~/.local/lib/python3.8/site-packages/javabridge/jutil.py in fn(*args)
      921         jexception = env.exception_occurred()
      922         if jexception is not None:
  --&gt; 923             raise JavaException(jexception)
      924         return result
      925     return fn
  
  JavaException: Unable to find class weka.filters.supervised.instance.RUS
  </code></pre>
  <p>I tried to install that a package or do an import, but it didn't works, so I don't know what to do to solve it.</p>