Akshay Gupta
Akshay Gupta

Reputation: 331

Issue in Weka and JavaBridge in Python

I am trying to run some code in Python, the code requires Weka library and to run Weka in Python I have installed Python-Weka_Wrapper, Javabridge and Weka, all of them are at latest stable release, Python is Python 2.7. I am getting an exception in Javabridge, the stack trace is given below:

File "/usr/local/lib/python2.7/dist-packages/weka/core/converters.py", line 78, in load_file
    return Instances(javabridge.call(self.jobject, "getDataSet", "()Lweka/core/Instances;"))
  File "/usr/local/lib/python2.7/dist-packages/weka/core/dataset.py", line 48, in __init__
    self.__set_instance = javabridge.make_call(self.jobject, "set", "(ILweka/core/Instance;)Lweka/core/Instance;")
  File "/usr/local/lib/python2.7/dist-packages/javabridge/jutil.py", line 789, in make_call
    raise JavaException(jexception)
javabridge.jutil.JavaException: set

Upvotes: 0

Views: 269

Answers (1)

Akshay Gupta
Akshay Gupta

Reputation: 331

The issue is with python-weka-wrapper. The bug has not been fixed in the stable release, but it has been fixed in the current build, so you can directly build from source.

This issue was not present in older stable versions.

Upvotes: 2

Related Questions