0

I have already set-up my database models and for the sake of visualizing my data's, I would like to generate a structure for it. I have installed the required packages which were successful.

List of installed packages for generating the graph using the pip command:

pydot
pyparsing
Graphviz
django-extensions

I was able to generate the dot file successfully by running the command python manage.py graph_models -a > erd.dot which worked successfully but whenever I used the command python manage.py graph_models -a -g -o erd.png in order to generate an image for it I get the FileNotFoundError: [WinError 2] "dot" not found in path error.

PaulMcG
  • 62,419
  • 16
  • 94
  • 130
coderboy
  • 741
  • 2
  • 17
  • 4
    Did you install graphviz(not the python package)? You need to install graphviz separately also the package simply uses the executable (might also need to add it to the PATH). You can download it on [https://graphviz.org/download/](https://graphviz.org/download/). – Abdul Aziz Barkat Feb 14 '21 at 06:52
  • alright. Thanks. I will do that now – coderboy Feb 15 '21 at 07:35
  • While pyparsing is part of this set of modules, it is not really relevant to the issue you are having. I'm editing your question to remove the `[pyparsing]` tag. – PaulMcG Feb 22 '21 at 03:01

1 Answers1

-1

After many tries and getting the same erros when trying to convert the .dot into a .png I just searched online and found several online tools that did this. I uploaded the .dot file but most of them gave me a PNG that did not have the tables and the lines as they should. This one converted correctly though: https://onlineconvertfree.com/convert/dot/

I also found a github project where you can paste the .dot code in, and it will provide a diagram on the side which can also be downloaded: Link . However, the first link above gave me a better-looking diagram.

Kliment
  • 39
  • 2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/34016617) – Viraj Shah Mar 17 '23 at 21:15