Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

TypeError #51

Closed
janlehmk opened this issue Nov 15, 2016 · 1 comment
Closed

TypeError #51

janlehmk opened this issue Nov 15, 2016 · 1 comment

Comments

@janlehmk
Copy link

Some functions in "Instances" don't work. For example the function "num_attributes()" throws a TypeError. It tries to call an "int".

@fracpete
Copy link
Owner

Sorry, but I can't reproduce this. Please not, num_attributes is a property and not a method!

Here's the code that I just ran (using 0.3.9):

>>> import weka.core.jvm as jvm
>>> jvm.start()
DEBUG:weka.core.jvm:Adding bundled jars
DEBUG:weka.core.jvm:Classpath=['/usr/local/lib/python2.7/dist-packages/javabridge/jars/rhino-1.7R4.jar', '/usr/local/lib/python2.7/dist-packages/javabridge/jars/runnablequeue.jar', '/usr/local/lib/python2.7/dist-packages/javabridge/jars/cpython.jar', '/usr/local/lib/python2.7/dist-packages/weka/lib/python-weka-wrapper.jar', '/usr/local/lib/python2.7/dist-packages/weka/lib/weka.jar']
DEBUG:weka.core.jvm:MaxHeapSize=default
DEBUG:javabridge.jutil:Creating JVM object
DEBUG:javabridge.jutil:Signalling caller
>>> from weka.core.converters import Loader
>>> loader = Loader(classname="weka.core.converters.ArffLoader")
>>> data = loader.load_file("/home/fracpete/Documents/uci/nominal/iris.arff")
>>> print(data.num_attributes)
5
>>> jvm.stop()
>>> 

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants