fhamborg / Giveme5W1H

Extraction of the journalistic five W and one H questions (5W1H) from news articles: who did what, when, where, why, and how?
Apache License 2.0
510 stars 88 forks source link

Error whilst running extractor.parse(doc) #25

Closed te-565 closed 6 years ago

te-565 commented 6 years ago

I'm getting an error when trying to run extractor.parse(doc). I've tried on both my text and also the example text and it occurs both times.

Error as follows:

Could not handle incoming annotation
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.6/site-packages/Giveme5W1H/extractor/extractor.py", line 20, in run
    extractor.process(document)
  File "/usr/local/lib/python3.6/site-packages/Giveme5W1H/extractor/extractors/abs_extractor.py", line 41, in process
    self._evaluate_candidates(document)
  File "/usr/local/lib/python3.6/site-packages/Giveme5W1H/extractor/extractors/action_extractor.py", line 104, in _evaluate_candidates
    if any(doc_coref.values()):
AttributeError: 'list' object has no attribute 'values'

Thanks!

te-565 commented 6 years ago

Version is giveme5w1h==1.0.12

te-565 commented 6 years ago

Let me know if there's anything else you need... This is my first issue!

fhamborg commented 6 years ago

The error seems to be coming from Stanford CoreNLP, not our tool. Could you provide a full, minimal code example, with which I can reproduce the error, including also an article text, please?

fhamborg commented 6 years ago

feel free to reopen in case the issue persists

ghost commented 5 years ago

Hi, I faced similar issue too. I ran giveme5w1h-rest command, then at the page, I ran 'run example' and faced this error.

Output at run giveme5w1h-rest console

  File "/usr/local/lib/python3.6/site-packages/Giveme5W1H/extractor/extractors/abs_extractor.py", line 41, in process
    self._evaluate_candidates(document)
  File "/usr/local/lib/python3.6/site-packages/Giveme5W1H/extractor/extractors/action_extractor.py", line 104, in _evaluate_candidates
    if any(doc_coref.values()):
AttributeError: 'list' object has no attribute 'values'

Output at corenlp console

Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 53 more
WeeklyUfo commented 4 years ago

Let me know if there's anything else you need... This is my first issue!

I am experiencing the exact same error code. Did you find a fix for this?

My Error Message is as follows:

Could not handle incoming annotation Exception in thread Thread-2: Traceback (most recent call last): File "C:\Python38\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\Python38\lib\site-packages\Giveme5W1H\extractor\extractor.py", line 20, in run extractor.process(document) File "C:\Python38\lib\site-packages\Giveme5W1H\extractor\extractors\abs_extractor.py", line 41, in process self._evaluate_candidates(document) File "C:\Python38\lib\site-packages\Giveme5W1H\extractor\extractors\action_extractor.py", line 104, in _evaluate_candidates if any(doc_coref.values()): AttributeError: 'list' object has no attribute 'values'

Any help would be greatly appreciated.