mingrammer / diagrams

:art: Diagram as Code for prototyping cloud system architectures
https://diagrams.mingrammer.com
MIT License
37.42k stars 2.44k forks source link

FileNotFoundError #931

Open xiashuqin89 opened 1 year ago

xiashuqin89 commented 1 year ago

when i try to run example code below:

# diagram.py
from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB

with Diagram("Web Service", show=False):
    ELB("lb") >> EC2("web") >> RDS("userdb")

It output exception info like this:

raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: PosixPath('dot'): PosixPath('dot')

and it seems not generate the png, but just a simple file contain some config info:


digraph "Web Service" {
    graph [fontcolor="#2D3436" fontname="Sans-Serif" fontsize=15 label="Web Service" nodesep=0.60 pad=2.0 rankdir=LR ranksep=0.75 splines=ortho]
    node [fixedsize=true fontcolor="#2D3436" fontname="Sans-Serif" fontsize=13 height=1.4 imagescale=true labelloc=b shape=box style=rounded width=1.4]
    edge [color="#7B8894"]
    d9ec3a4145974bcfbb9bec00eac94fd3 [label=lb height=1.9 image="/Users/leiyang/workspace/project37/scenelink/env/lib/python3.6/site-packages/resources/aws/network/elastic-load-balancing.png" shape=none]
    f23e9edb49fc4e83b9845d137029b3d4 [label=web height=1.9 image="/Users/leiyang/workspace/project37/scenelink/env/lib/python3.6/site-packages/resources/aws/compute/ec2.png" shape=none]
    d9ec3a4145974bcfbb9bec00eac94fd3 -> f23e9edb49fc4e83b9845d137029b3d4 [dir=forward fontcolor="#2D3436" fontname="Sans-Serif" fontsize=13]
    dcb76d559c944477a383278dfde416d9 [label=userdb height=1.9 image="/Users/leiyang/workspace/project37/scenelink/env/lib/python3.6/site-packages/resources/aws/database/rds.png" shape=none]
    f23e9edb49fc4e83b9845d137029b3d4 -> dcb76d559c944477a383278dfde416d9 [dir=forward fontcolor="#2D3436" fontname="Sans-Serif" fontsize=13]
}

what's the problem

xiashuqin89 commented 1 year ago

sorry, i forgot to install a dependency

asaltv commented 7 months ago

@xiashuqin89 maybe close the issue then...