From b68cd877cac1d7ca77a8e5055f4f12b70f8190c6 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 26 Oct 2021 17:29:52 -0700 Subject: grobid: fix a bug with consolidate_mode header, exposed by type annotations --- python/sandcrawler/grobid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/sandcrawler/grobid.py b/python/sandcrawler/grobid.py index a44861a..ae96fc8 100644 --- a/python/sandcrawler/grobid.py +++ b/python/sandcrawler/grobid.py @@ -28,13 +28,14 @@ class GrobidClient(object): if consolidate_mode is None: consolidate_mode = self.consolidate_mode + assert consolidate_mode is not None try: grobid_response = requests.post( self.host_url + "/api/processFulltextDocument", files={ 'input': blob, - 'consolidateHeader': self.consolidate_mode, + 'consolidateHeader': consolidate_mode, 'consolidateCitations': 0, # too expensive for now 'includeRawCitations': 1, }, -- cgit v1.2.3