Lynten / stanford-corenlp

Python wrapper for Stanford CoreNLP.
MIT License
919 stars 199 forks source link

_request method unchecked response #12

Open scottwthompson opened 6 years ago

scottwthompson commented 6 years ago

https://github.com/Lynten/stanford-corenlp/blob/master/stanfordcorenlp/corenlp.py#L176

r_dict = json.loads(r.text)

should be try/except or check r.ok/status.

Method has invoked uncaught exceptions for me

Lynten commented 6 years ago

Yes, somtimes it will raise an error. The wrapper is just a simple parser interacting with the Java web server which is not stable, so I leave the exception to be handled outside by users.