Skip to content

Commit

Permalink
fix the problem of internal server error when use grew search or rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
khansadaoudi committed Feb 11, 2025
1 parent 6b238d6 commit 9b8c627
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/utils/grew_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down

0 comments on commit 9b8c627

Please sign in to comment.