From 64e2b00c4b74d132fe1bf135f37d6721e8d468b4 Mon Sep 17 00:00:00 2001 From: thomashacker Date: Thu, 8 Dec 2022 13:11:01 +0100 Subject: [PATCH] Fix tests for json conversion --- spacy/tokens/doc.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index ae58aa586..b7506f745 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -1719,7 +1719,7 @@ cdef class Doc: data["underscore_token"][attr] = [] data["underscore_token"][attr].append({"start": start, "value": value}) # Else span attribute - else: + elif end is not None: _label = data_key[4] _kb_id = data_key[5] _span_id = data_key[6]