From 1e333668201d0cf70ca26934b9f36ada87f2a3e4 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Thu, 22 Jun 2023 16:44:29 +0200 Subject: [PATCH] fix cache loading string instead of parsing json --- app/corpora/cqi_over_socketio/cqi_corpora_corpus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/corpora/cqi_over_socketio/cqi_corpora_corpus.py b/app/corpora/cqi_over_socketio/cqi_corpora_corpus.py index c18ceda4..1c15e2f0 100644 --- a/app/corpora/cqi_over_socketio/cqi_corpora_corpus.py +++ b/app/corpora/cqi_over_socketio/cqi_corpora_corpus.py @@ -54,7 +54,7 @@ def cqi_corpora_corpus_get_visualization_data(cqi_client: cqi.CQiClient, corpus_ visualization_data_file_path = os.path.join(corpus.path, 'cwb', 'visualization_data.json') if os.path.exists(visualization_data_file_path): with open(visualization_data_file_path, 'r') as f: - payload = f.read() + payload = json.load(f) return {'code': 200, 'msg': 'OK', 'payload': payload} cqi_corpus = cqi_client.corpora.get(corpus_name) ##########################################################################