how to create root with treelib?

Ho Yeung Lee jobmattcon at gmail.com
Sat Aug 19 20:58:11 EDT 2017


http://treelib.readthedocs.io/en/latest/examples.html

tree = Tree()
#create root
tree.create_node((0,0), "root")
result = [aa[0]]
previousnode = (0,0)

>>> #create root
... tree.create_node((0,0), "root")
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "C:\Python27\lib\site-packages\treelib\node.py", line 142, in __repr__
    "tag=%r" % self.tag,
TypeError: not all arguments converted during string formatting



More information about the Python-list mailing list