bd2kccd / py-causal

Other
204 stars 50 forks source link

Error when running "Calling Directly Py-Causal PC Example.ipynb" #96

Closed chengweiclarence closed 4 years ago

chengweiclarence commented 4 years ago

Hi! When I run the code in "Calling Directly Py-Causal PC Example.ipynb" : nodi = javabridge.JClassWrapper("edu.cmu.tetrad.data.ContinuousVariable")(col)

I get the error below: `JavaException Traceback (most recent call last) in 2 # load dataset 3 for col in dframe.columns: ----> 4 nodi = javabridge.JClassWrapper("edu.cmu.tetrad.data.ContinuousVariable")(col) 5 node_list.add(nodi)

c:\users\sx-liang\appdata\local\programs\python\python37\lib\site-packages\javabridge\wrappers.py in init(self, class_name) 229 STATIC = J.get_static_field("java/lang/reflect/Modifier", "STATIC", "I") 230 self.cname = class_name.replace(".", "/") --> 231 self.klass = J.get_class_wrapper(J.class_for_name(class_name), True) 232 self.static_methods = {} 233 env = J.get_env()

c:\users\sx-liang\appdata\local\programs\python\python37\lib\site-packages\javabridge\jutil.py in class_for_name(classname, ldr) 1746 '(Ljava/lang/String;ZLjava/lang/ClassLoader;)' 1747 'Ljava/lang/Class;', -> 1748 classname, True, ldr) 1749 1750 def get_class_wrapper(obj, is_class = False):

c:\users\sx-liang\appdata\local\programs\python\python37\lib\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) --> 943 result = fn(nice_args) 944 return get_nice_result(result, ret_sig) 945

c:\users\sx-liang\appdata\local\programs\python\python37\lib\site-packages\javabridge\jutil.py in fn(*args) 921 jexception = env.exception_occurred() 922 if jexception is not None: --> 923 raise JavaException(jexception) 924 return result 925 return fn

JavaException: edu.cmu.tetrad.data.ContinuousVariable `

Should I check my Internet settings or pre-download the necessary package? If I need to pre-download the necessary package, where should it be put?

Thanks in advance!