0

I need to visually inspect object dependencies in some python code to find a memory leak. I'm trying to use objgraph, but running into problems because one of its dependencies, xdot, requires gobject, and I can't find where to get it for osx. This is what I'm getting:

(Pdb++) import objgraph; 

objgraph.show_backrefs(objgraph.by_type("list")[0:50])
Graph written to /var/folders/64/dx79x1dj7d5g5ly8c64r5yp40000gn/T/objgraph-j9kxbmo6.dot (84 nodes)
Spawning graph viewer (xdot)
(Pdb++) Traceback (most recent call last):
  File "/Users/bin/xdot", line 7, in <module>
    from xdot import main
  File "/Users/lib/python3.4/site-packages/xdot.py", line 33, in <module>
    import gobject
ImportError: No module named 'gobject'

Is there a fix for this error on osx? Or are there alternatives to objgraph that will work properly on osx?

LateCoder
  • 2,163
  • 4
  • 25
  • 44
  • 1
    You could use another Graphviz renderer, for example use `dot` to render into a PDF or PNG file. `dot` is part of Graphviz which is available for OS X on graphviz.org or easily installed via Homebrew. – Ingmar Hupp Dec 02 '15 at 15:05
  • I did that, but `dot` is not recognized by the shell as a command. – LateCoder Dec 02 '15 at 15:24

0 Answers0