在PyCharm上运行PyCallgraph

时间:2016-02-01 07:48:05

标签: python pycharm dot pycallgraph

我正在尝试在我的应用程序上运行PyCallgraph模块。我的应用程序在Mac上运行,我从PyCharm运行应用程序 这是我试过的

def main(url):
    from pycallgraph import PyCallGraph
    from pycallgraph.output import GephiOutput, GraphvizOutput
    graphviz = GraphvizOutput()
    with PyCallGraph(output=graphviz):
        obj = MyApp("agr1")
        obj.extract('372','100001' , '999')

我收到以下错误...

    libpath/shortest.c:324: triangulation failed
libpath/shortest.c:192: source point not in any triangle
Error: in routesplines, Pshortestpath failed
Traceback (most recent call last):
  File "/Users/anurag/Work/quad-projects/quad-hge/src/main/python/extractor/hgextractor.py", line 63, in <module>
    main(url)
  File "/Users/anurag/Work/quad-projects/quad-hge/src/main/python/extractor/hgextractor.py", line 51, in main
    hge.extract('372','100001' , '999', url_list)
  File "/Users/anurag/.virtualenvs/robot/lib/python2.7/site-packages/pycallgraph/pycallgraph.py", line 38, in __exit__
    self.done()
  File "/Users/anurag/.virtualenvs/robot/lib/python2.7/site-packages/pycallgraph/pycallgraph.py", line 81, in done
    self.stop()
  File "/Users/anurag/.virtualenvs/robot/lib/python2.7/site-packages/pycallgraph/pycallgraph.py", line 90, in generate
    output.done()
  File "/Users/anurag/.virtualenvs/robot/lib/python2.7/site-packages/pycallgraph/output/graphviz.py", line 112, in done
    'code %(ret)i.' % locals())
pycallgraph.exceptions.PyCallGraphException: The command "dot -Tpng -opycallgraph.png /var/folders/00/z1t7sw2x1ml1ydhgp084c1xh0000gn/T/tmphl_rNH" failed with error code 11.

Process finished with exit code 1

我甚至尝试使用graphviz在我的Mac上安装brew install graphviz 并在我的PyCharm编辑器上设置$ PATH变量,如pycallgraph with pycharm does not work

所述

我不知道确切的根本原因,我在最后2-3天都被困在这里。

0 个答案:

没有答案