From ca098b44acace6fcc602c4ef9973c067d3b7a01b Mon Sep 17 00:00:00 2001 From: Jonathan Legrand Date: Mon, 19 Aug 2024 18:14:31 +0200 Subject: [PATCH] Declare a required fixme. --- src/plantdb/rest_api_client.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plantdb/rest_api_client.py b/src/plantdb/rest_api_client.py index f9b3066..fc16862 100644 --- a/src/plantdb/rest_api_client.py +++ b/src/plantdb/rest_api_client.py @@ -493,7 +493,13 @@ def parse_requests_tree(data): The loaded (tree) graph object. """ import pickle - return pickle.load(BytesIO(data)) + tree = pickle.load(BytesIO(data)) + # FIXME: it would be better to return something that is JSON serializable... + # but the tree is not directed, so the `json_graph.tree_data` fails! + # from networkx.readwrite import json_graph + # data = json_graph.tree_data(tree, root=0) + # return json.dumps(data) + return tree def parse_requests_json(data):