Python 2.5错误 - 图形显示

时间:2015-11-28 20:03:14

标签: python networkx

有人可以查看下面的错误并告诉我是否可以修复或意味着什么。我是新的Python,并试图让其他人开发软件。它应该在最后生成一个图像文件,但它不会。谢谢。[Python2.5,Windows]

click to see the error

#print "solution is " , solution
    G=XDiGraph()
    # 1. edging r_in to web services
    r_in = Set(goalService.inputList)
    #print "Ri is :", r_in
    r_out = Set(goalService.outputList)
    #print "Ro is :", r_out

    for ws in solution:
        if Set(self.webServiceList[ws].inputList).issubset(r_in):
            G.add_edge('Ri', ws, 1)
            #print "Ri fully matches ", ws
        elif len (Set(self.webServiceList[ws].inputList).intersection(r_in)) !=0 :
            G.add_edge('Ri', ws, 0)
            #print "Ri partially matches ", ws

    if r_out.issubset(r_in):
        G.add_edge('Ri', 'Ro', 1)
        #print "Ri fully matches Ro"
    elif len (r_out.intersection(r_in)) !=0 :
        G.add_edge('Ri', 'Ro', 0)
        #print "Ri partially matches Ro"

1 个答案:

答案 0 :(得分:0)

选项1:更新您运行的代码以使用加权DiGraph而不是XDiGraph s。

选项2:安装较旧版本的networkx。在networkx版本0.37之后删除了XDiGraph