From 334dd8354619ebaf325782b88a340477f8b7b746 Mon Sep 17 00:00:00 2001 From: Philipp Schlegel Date: Mon, 26 Apr 2021 15:56:51 +0100 Subject: [PATCH] update_radii: make sure node IDs are integers, not e.g. np.int32 --- pymaid/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymaid/upload.py b/pymaid/upload.py index 6317f9b..5fd40a5 100644 --- a/pymaid/upload.py +++ b/pymaid/upload.py @@ -1539,7 +1539,7 @@ def update_radii(radii, chunk_size=1000, remote_instance=None): update_post.update({"treenode_radii[{}]".format(i): k for i, k in enumerate(this_chunk.values())}) # State has to be provided as {'state': [(node_id, edition_time), ..]} - update_post.update({"state": [(k, edition_times[str(k)]) for k in this_chunk]}) + update_post.update({"state": [(int(k), edition_times[str(k)]) for k in this_chunk]}) # We have to explicitly convert the state in a json string because passing # it to requests as "post" will f*** this up otherwise