Skip to content

Commit

Permalink
update_radii: make sure node IDs are integers, not e.g. np.int32
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Apr 26, 2021
1 parent d3be507 commit 334dd83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymaid/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 334dd83

Please sign in to comment.