dygiepp icon indicating copy to clipboard operation
dygiepp copied to clipboard

ace2005 event process error

Open xxllp opened this issue 2 years ago • 1 comments

when I run python ./scripts/data/ace-event/parse_ace_event.py default-settings and get into debug model the error log is below

include_event_coreference=args.include_event_coreference) File "./scripts/data/ace-event/parse_ace_event.py", line 803, in one_fold js = document.to_json() File "./scripts/data/ace-event/parse_ace_event.py", line 735, in to_json js = doc.to_json() File "./scripts/data/ace-event/parse_ace_event.py", line 232, in to_json self.remove_whitespace() File "./scripts/data/ace-event/parse_ace_event.py", line 219, in remove_whitespace entry.remove_whitespace() File "./scripts/data/ace-event/parse_ace_event.py", line 163, in remove_whitespace self.align() File "./scripts/data/ace-event/parse_ace_event.py", line 155, in align entity.align(self.sent) File "./scripts/data/ace-event/parse_ace_event.py", line 46, in align self.span_sentence = get_token_indices(self, sent.as_doc()) File "./scripts/data/ace-event/parse_ace_event.py", line 251, in get_token_indices debug_if(len(start_token) != 1) File "./scripts/data/ace-event/parse_ace_event.py", line 245, in debug_if import ipdb; ipdb.set_trace() File "/root/anaconda3/envs/py36/lib/python3.6/bdb.py", line 55, in trace_dispatch return self.dispatch_return(frame, arg)

xxllp avatar Jun 09 '22 09:06 xxllp

I see this has been re-opened? To help debug, can you identify the line(s) in your input file that are causing the problem?

dwadden avatar Sep 11 '22 23:09 dwadden

I have reveived the same error. The line raising the problem is in the function debug_if, where python attempted to import ipdb.

After installing ipdb, i have got the following error:

Traceback (most recent call last):
  File "./scripts/data/ace-event/parse_ace_event.py", line 845, in <module>
    main()
  File "./scripts/data/ace-event/parse_ace_event.py", line 841, in main
    include_event_coreference=args.include_event_coreference)
  File "./scripts/data/ace-event/parse_ace_event.py", line 803, in one_fold
    js = document.to_json()
  File "./scripts/data/ace-event/parse_ace_event.py", line 735, in to_json
    js = doc.to_json()
  File "./scripts/data/ace-event/parse_ace_event.py", line 233, in to_json
    self.remove_whitespace()
  File "./scripts/data/ace-event/parse_ace_event.py", line 220, in remove_whitespace
    entry.remove_whitespace()
  File "./scripts/data/ace-event/parse_ace_event.py", line 164, in remove_whitespace
    self.align()
  File "./scripts/data/ace-event/parse_ace_event.py", line 156, in align
    entity.align(self.sent)
  File "./scripts/data/ace-event/parse_ace_event.py", line 47, in align
    self.span_sentence = get_token_indices(self, sent.as_doc())
  File "./scripts/data/ace-event/parse_ace_event.py", line 252, in get_token_indices
    start_token = start_token[0]
IndexError: list index out of range

Does anyone know how to fix it? Thanks anyway!

liuchengyuan123 avatar Nov 21 '22 12:11 liuchengyuan123

I have reveived the same error. The line raising the problem is in the function debug_if, where python attempted to import ipdb.

After installing ipdb, i have got the following error:

Traceback (most recent call last):
  File "./scripts/data/ace-event/parse_ace_event.py", line 845, in <module>
    main()
  File "./scripts/data/ace-event/parse_ace_event.py", line 841, in main
    include_event_coreference=args.include_event_coreference)
  File "./scripts/data/ace-event/parse_ace_event.py", line 803, in one_fold
    js = document.to_json()
  File "./scripts/data/ace-event/parse_ace_event.py", line 735, in to_json
    js = doc.to_json()
  File "./scripts/data/ace-event/parse_ace_event.py", line 233, in to_json
    self.remove_whitespace()
  File "./scripts/data/ace-event/parse_ace_event.py", line 220, in remove_whitespace
    entry.remove_whitespace()
  File "./scripts/data/ace-event/parse_ace_event.py", line 164, in remove_whitespace
    self.align()
  File "./scripts/data/ace-event/parse_ace_event.py", line 156, in align
    entity.align(self.sent)
  File "./scripts/data/ace-event/parse_ace_event.py", line 47, in align
    self.span_sentence = get_token_indices(self, sent.as_doc())
  File "./scripts/data/ace-event/parse_ace_event.py", line 252, in get_token_indices
    start_token = start_token[0]
IndexError: list index out of range

Does anyone know how to fix it? Thanks anyway!

Well, I figure it out finally. There are two requirements.txt in this repository, the one to process ace2005 event requires spacy==2.0.18 and corrsponding en-core-web-sm == 2.0.0. Otherwise, different length will cause the error above.

liuchengyuan123 avatar Nov 22 '22 03:11 liuchengyuan123

You found it! Sorry that this is indeed somewhat confusing. The README does specify that you need to create a new virtualenv with different dependencies, but I'm sorry for the inconvenience,

dwadden avatar Nov 29 '22 01:11 dwadden