GithubHelp home page GithubHelp logo

Comments (5)

axt avatar axt commented on June 3, 2024

Hi!

The dot utility is needed to convert the graphs from the raw dot format, to anything else, like pdf, svg, png, etc. The format can be specified as a parameter to plot_cfg, the default setting is png.

You can do two things:

  • The dotutility is provided by graphviz, if you install graphviz the problem should disappear.
  • Specify a format="raw"parameter to plot_cfg: in this case the output will be the graph in the raw dot format. Still if you want to view that, you will need graphviz to render it, so I recommend to install graphviz.

from angr-utils.

it-nerdy avatar it-nerdy commented on June 3, 2024

format="raw" parameter works fine. I am able to see raw files. I installed graphviz but still error persists, in case of format="png". May be i will use other ways to convert raw file to visible image file.

from angr-utils.

axt avatar axt commented on June 3, 2024

With the dot utility you can use the following command, to convert the raw files into a png:

dot -Tpng -o out.png in.raw

you should check, if this is working for you. If it does, then the error lays somewhere in the pydot package, I use that to interact with dot. My guess is that somehow the dot utility is not found by the package, or it is not executable, or something like that.

I usually generate raw files (because its much faster), and view them with xdot, which also uses the dot command for rendering. (https://github.com/jrfonseca/xdot.py)

Environment issues are hard to debug, I would do an

strace -f python script_to_generate_the_graph.py |& grep 'dot' 

to see what happens under the hood.

from angr-utils.

it-nerdy avatar it-nerdy commented on June 3, 2024

Thanks for you quick responses, it helped me in resolving the issue. I got the point, actually pydot is invoking a command that uses dot utility (it is running internally dot -Tpng -o out.png in.raw ) . Since I don't have xdot installed in my system it is was throwing error. Now, I installed xdot tool in my linux system, issue is resolved. I can generate png files directly. May be, you can document it some where, in requirements to install xdot. Thanks again.

from angr-utils.

axt avatar axt commented on June 3, 2024

I think I figured out what happened.

The xdot package is not needed for the library to function correctly, but the xdot package has
graphviz as a dependency, so when you installed xdot you also installed graphviz.

My guess is, that when you tried to install graphviz before, instead of the system package graphviz which is the graph rendering tool, you installed the python package called graphviz, which is just a python wrapper around the utility.

$ apt-file find -F '/usr/bin/dot'
graphviz: /usr/bin/dot
$ apt-file show xdot
xdot: /usr/bin/xdot
xdot: /usr/lib/python3/dist-packages/xdot-0.7.egg-info/PKG-INFO
xdot: /usr/lib/python3/dist-packages/xdot-0.7.egg-info/dependency_links.txt
xdot: /usr/lib/python3/dist-packages/xdot-0.7.egg-info/entry_points.txt
xdot: /usr/lib/python3/dist-packages/xdot-0.7.egg-info/top_level.txt
xdot: /usr/lib/python3/dist-packages/xdot.py
xdot: /usr/share/applications/xdot.desktop
xdot: /usr/share/doc/xdot/changelog.Debian.gz
xdot: /usr/share/doc/xdot/copyright
xdot: /usr/share/man/man1/xdot.1.gz

from angr-utils.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.