FraBle / python-sutime

Python wrapper for Stanford CoreNLP's SUTime
GNU General Public License v3.0
154 stars 43 forks source link

ReflectionLoadingException for funtion SUTime #19

Closed rohitmujumdar closed 6 years ago

rohitmujumdar commented 6 years ago

STACK TRACE :

edu.stanford.nlp.util.ReflectionLoading$ReflectionLoadingExceptionPyRaisableTraceback (most recent call last)

in () 6 7 jar_files = "C:/Users/Rohit/AppData/Local/conda/conda/envs/rohitfroot/Lib/site-packages/sutime/jars" ----> 8 sutime = SUTime(jars=jar_files, mark_time_ranges=True) 9 10 print(json.dumps(sutime.parse(test_case), sort_keys=True, indent=4)) ~\AppData\Local\conda\conda\envs\rohitfroot\lib\site-packages\sutime\sutime.py in __init__(self, jars, jvm_started, mark_time_ranges, include_range) 57 'edu.stanford.nlp.python.SUTimeWrapper') 58 self._sutime = SUTimeWrapper( ---> 59 self.mark_time_ranges, self.include_range) 60 self._is_loaded = True 61 finally: ~\AppData\Local\conda\conda\envs\rohitfroot\lib\site-packages\jpype\_jclass.py in _javaInit(self, *args) 109 else: 110 self.__javaobject__ = self.__class__.__javaclass__.newClassInstance( --> 111 *args) 112 113 edu.stanford.nlp.util.ReflectionLoading$ReflectionLoadingExceptionPyRaisable: edu.stanford.nlp.util.ReflectionLoading$ReflectionLoadingException: Error creating edu.stanford.nlp.time.TimeExpressionExtractorImpl DETAILS : Python == 3.7 OS == Windows 8.1 JPype == 0.6.3 Could anyone tell me what is going wrong?
devmaha commented 6 years ago

Getting same error with Python 3.6 too. It would be wonderful to get some help on this topic.

FraBle commented 6 years ago

Seems to be an issue with Java itself: https://github.com/stanfordnlp/CoreNLP/issues/636 I'm currently looking into upgrade the dependencies.

FraBle commented 6 years ago

Could you please install the v.1.0.0 release candidate 4 with pip install sutime==1.0.0rc4, update the Java dependencies with mvn dependency:copy-dependencies -DoutputDirectory=./jars, and check if the error still comes up? If yes, please reopen the issue.

rohitmujumdar commented 6 years ago

Thank you. It works now. Loved the tool, it's very comprehensive.