From 3a03c668c3d23786db5d6c3046658e7f9180b458 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 12 Oct 2016 14:44:31 +0200 Subject: [PATCH] Fix message in ParserStateError --- spacy/syntax/parser.pyx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/spacy/syntax/parser.pyx b/spacy/syntax/parser.pyx index f75afbdf7..f124bae37 100644 --- a/spacy/syntax/parser.pyx +++ b/spacy/syntax/parser.pyx @@ -305,12 +305,13 @@ cdef class StepwiseState: class ParserStateError(ValueError): def __init__(self, doc): - self.message = ("Error analysing doc -- no valid actions available. This should " - "never happen, so please report the error on the issue tracker. " - "Here's the thread to do so --- reopen it if it's closed:\n" - "https://github.com/spacy-io/spaCy/issues/429\n" - "Please include the text that the parser failed on, which is:\n" - "%s" % repr(doc.text)) + ValueError.__init__(self, + "Error analysing doc -- no valid actions available. This should " + "never happen, so please report the error on the issue tracker. " + "Here's the thread to do so --- reopen it if it's closed:\n" + "https://github.com/spacy-io/spaCy/issues/429\n" + "Please include the text that the parser failed on, which is:\n" + "%s" % repr(doc.text)) cdef int _arg_max_clas(const weight_t* scores, int move, const Transition* actions,