From d65fdd7c6bb7be78d0eca4ba23771f3fca3282d3 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 28 Oct 2021 14:57:27 +0200 Subject: tasks: address type issue --- python/refcat/tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py index d42bfa5..7cf346b 100644 --- a/python/refcat/tasks.py +++ b/python/refcat/tasks.py @@ -1571,7 +1571,9 @@ class UnmatchedRefsReparse(Refcat): citations = grobid_tei_xml.parse_citations_xml(grobid_resp.text) if len(citations) == 0: continue - output.write(json.dumps(citations[0].to_dict()) + "\n") + json.dump(citations[0].to_dict(), output) + output.write("\n") + def output(self): return luigi.LocalTarget(path=self.path(ext="json.zst"), format=Zstd) -- cgit v1.2.3