From 9b8c627762dced8f382b46d95a50b0eb58e3863f Mon Sep 17 00:00:00 2001 From: khansadaoudi Date: Tue, 11 Feb 2025 16:11:23 +0100 Subject: [PATCH] fix the problem of internal server error when use grew search or rewrite --- app/utils/grew_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/utils/grew_utils.py b/app/utils/grew_utils.py index 7a65296..20ce305 100644 --- a/app/utils/grew_utils.py +++ b/app/utils/grew_utils.py @@ -560,8 +560,8 @@ def format_trees_new(m, trees, is_package: bool = False): if sent_id not in trees[sample_name]: try: sentence_json = sentenceConllToJson(conll) - except ValueError: - abort(400, 'The result of your query can not be processed by ArboratorGrew') + except Exception as e: + abort(400, 'The result of your query can not be processed by ArboratorGrew beacuse: {}'.format(str(e))) sentence_text = constructTextFromTreeJson(sentence_json["treeJson"]) trees[sample_name][sent_id] = {