python-wrapper-OpenIE5 icon indicating copy to clipboard operation
python-wrapper-OpenIE5 copied to clipboard

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Open 23Uday opened this issue 4 years ago • 3 comments

A very long text leads to the following error: JSONDecodeError: Expecting value: line 1 column 1 (char 0) Server started with java -Xmx10-XX:+UseConcMarkSweepGC -jar openie-assembly-5.0-SNAPSHOT.jar --split --ignore-errors --httpPort 8000 The input text was text extracted from a research paper.

23Uday avatar Mar 27 '20 12:03 23Uday

Maybe you could process sentence by sentence.

chaos87 avatar Apr 01 '20 01:04 chaos87

Hi,

The --split option is currently used only while running OpenIE5 to process an input file. It is not applicable to running OpenIE5 as a server. Hence, you can split the text into sentences and pass each sentence to the server to get the extraction.

vaibhavad avatar Apr 02 '20 09:04 vaibhavad

This happens when the output is a list and not a single value, change the last line of openie.py to : try: e=json.loads(r.text) except: e=r.text return e

and then it works!

satya77 avatar Jun 06 '20 07:06 satya77