You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a tree over which I'd like to print the path between two nodes. I could not find a function that does the magic, but I believe the closest is expand_tree(). However, upon calling it and trying to print the nodes, I get an error:
path = tree.expand_tree(tree.get_node(4), filter=tree.get_node(83), sorting=False)
for node in path:
print(node)
Traceback (most recent call last):
File "E:\question.py", line 55, in <module>
for node in path:
File "E:\Anaconda3\envs\3dreconst\lib\site-packages\treelib\tree.py", line 427, in expand_tree
raise NodeIDAbsentError("Node '%s' is not in the tree" % nid)
treelib.exceptions.NodeIDAbsentError: Node 'Node(tag=4, identifier=4, data=None)' is not in the tree
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
I have a tree over which I'd like to print the path between two nodes. I could not find a function that does the magic, but I believe the closest is
expand_tree()
. However, upon calling it and trying to print the nodes, I get an error:What am I doing wrong?
The text was updated successfully, but these errors were encountered: