Open lipingliang opened 4 years ago
@lipingliang Do you have error in the console? Which version do you use?
I tried with last version 0.15 your code and it generate this:
Maybe try the example code and see if the icon display...
https://diagrams.mingrammer.com/docs/getting-started/examples
If icons don't display try to reinstall.
thanks! I have reinstall 3 times, the problem remains.
My diagrams version is 0.16.0. In console, the error: can't open clustered_web_services.
@mingrammer I have some experience with bug reporting in an open source project and I believe I can create a decorator to detect errors in the project and facilitate the reporting of bugs and problems like this. I think in this case it could be useful.
What do you think of the idea? I can do a PR.
@lipingliang Can you prevent copy paste the previous message and only post your reply it will make more easy to follow. Thanks!
Can you put in gist again your code well formatted. (In your first post, there's indentations problems). I expect that you may have some indentations errors that may raise the error you provided. Let's go step by step and try to figure out what is wrong with your installation.
Can you provide more information about your environment (OS: Windows Mac Linux .... Python version etc...) How did you install Diagrams? which version of graphiz do you have? This may help us to reproduce the problem.
@gabriel-tessier thank you very much! My OS is Win7, Python version is 3.6. I use pycharm installing diagrams. The graphviz version is 0.13.2. Now, I run below code, the error is: 'Global diagrams context not set up'. from diagrams import Cluster, Diagram from diagrams.aws.compute import ECS, EKS, Lambda from diagrams.aws.database import Redshift from diagrams.aws.integration import SQS from diagrams.aws.storage import S3
with Diagram("Event Processing", show=True): source = EKS("k8s source")
with Cluster("Event Flows"): with Cluster("Event Workers"): workers = [ECS("worker1"), ECS("worker2"), ECS("worker3")]
queue = SQS("event queue")
with Cluster("Processing"):
handlers = [Lambda("proc1"),
Lambda("proc2"),
Lambda("proc3")]
store = S3("events store") dw = Redshift("analytics")
the version is :
@leandrodamascena Could you please give me some more details? Pseudo code would be greatly helpful!
@lipingliang
I'm sorry I can't reproduce your problem but it look like it's a problem with your system installation... and I don't have windows 7 to test. Your initial problem with the pictures that don't display can be maybe related to this issue, if the resources folder can't be find: https://github.com/mingrammer/diagrams/issues/163
Maybe somebody else with Windows and similar environment can reproduce the error and solve your problem.
@lipingliang
Actually you can build your diagrams using docker, for the installation follow the instruction here: https://github.com/mingrammer/diagrams/blob/master/DEVELOPMENT.md
Then you can put you file with the python code in the root of the source directory and run docker exec diagrams-1.0 python your_file.py
and it will generate your diagrams file.
Hope it help.
Hi there :wave:
I have a similar issue, OS is Linux/NixOS, installed version 0.19.1.
Following code:
#!/usr/bin/env python3
from diagrams import Diagram
from diagrams.generic.os import LinuxGeneral
from diagrams.generic.os import Centos
with Diagram("Grouped Workers", show=False, direction="TB"):
Centos("lb") >> [LinuxGeneral("worker1"), LinuxGeneral("w2")] >> LinuxGeneral("test")
Generates this:
I suspect this is related with something missing, but I can't see any warnings/errors anywhere. Dependencies supplied are:
Can I help debugging further?
Hi @seqizz,
Is graphviz installed on your system? https://www.graphviz.org/download/#linux If it's installed can you provide the version? Thanks
Can you consider using docker as described here: https://github.com/mingrammer/diagrams/blob/master/DEVELOPMENT.md
Hope it help you debugging your problem.
Hi,
Yes, graphviz version 2.42.2 is installed.
I was trying to solve this without Docker, since I was planning to package it for NixOS also. But apparently it's already packaged. Trying from that derivation, no issues anymore. :tada:
Sorry for the noise & thanks!
Having the same issue, by using an Arch Linux package from the AUR:
No errors in the stdout/stderr, nothing at all.
Package was missing resources. Sent instructions to the maintainer to fix this!
what were the instructions to make this work?
Was a solution to this ever provided? I also get this error message:
raise EnvironmentError("Global diagrams context not set up")
OSError: Global diagrams context not set up
I was having the same error here, running the code in pycharm. I just change to run in command line 'python mycode.py'
And the image was generated in the correct way. I believe something is missing in my venv in pycharm, but command line works fine.
dear friends: in my program, the node of result png is blank, why? help me, thanks!
the code:
from diagrams import Cluster, Diagram from diagrams.aws.compute import ECS, EKS, Lambda from diagrams.aws.database import Redshift from diagrams.aws.integration import SQS from diagrams.aws.storage import S3
with Diagram("Event Processing", show=True): source = EKS("k8s source")