asciidag icon indicating copy to clipboard operation
asciidag copied to clipboard

graph cause asciidag break

Open luluman opened this issue 3 years ago • 1 comments

When I run this code, an error occurred.

from asciidag.graph import Graph
from asciidag.node import Node

graph = Graph()

nodeA = Node('A', parents=[])
nodeB = Node('B', parents=[])
nodeC = Node('C', parents=[])
nodeD = Node('D', parents=[nodeA, nodeB, nodeC])

tips = [
    Node('E',
         parents=[
             Node('F', parents=[nodeC, nodeD]),
             Node('G', parents=[Node('H', parents=[nodeD]), nodeD])
         ])
]

graph.show_nodes(tips)

This is the log.

WeChat573717b395e1376afa67889a9e41d931

Sometimes "asciidag" may succeed, which will print the right graph.

WeChat58d8bdeda6a15fbbad1fdaea2fcc4959

I have tested on python3.5.2, and it will pass when first run but failed afterward. I never success on python 3.9.2.

luluman avatar Mar 25 '21 15:03 luluman

I can confirm the issue but haven't had chance to look into it yet.

sambrightman avatar Apr 07 '21 07:04 sambrightman