Closed alanthssss closed 11 months ago
+1 to env support.
Hi @alanthssss and @msouff, thank you so much for trying out the extension. Appreciate the feedback on the use case on using the interpreter that is set from vscode python extension.
We would like to share with you a good news - we are in the mist of adding this capability. We will keep you posted once itβs ready. π
Hi @alanthssss and @msouff
We have released a new version (1.0.6) to cater for this functionality. π€
You may try out the new option in the settings - "VS Code Python Interpreter"
Feel free to reach out again for any other issues. πΈ Cheers π₯
Hi, thanks for writing this extension. I am working on a Mac with Python 3.10 and GraphViz installed via brew. I am trying to run your demo code in a virtual environment. From the command line (.venv) it works as expected. The png is created and the image viewer opens when show=True. However in VS Code I get this error no matter what diagramspreviewer.pythonCommand is set to:
VS Code Python interpreter is set to the virtual environment:
And Diagramspreviewer: Python Command is set to "VS Code Python Interpreter"
Any ideas what I am doing wrong or should try next?
Thanks, Don
Hi @don-harden Thank you for sharing this. π
Would you mind helping me with the following?
v1.0.6
)? Hi Chialiyun,
I installed Diagrams Previewer yesterday and it is version 1.0.6
The local command I am running is python demo.py
in my Python 3.10 virtual environment. In the screenshot below you can see that both python and python3 are pointing the virtual environment, and the00 my_diagram.png
is created when running python demo.py
My virtual environment is in the same directory as your demo code.
Also, since I have show=True the image viewer pops up:
hi @don-harden Thank for so much for sharing those information.
It's an issue with how we are reading the script. We will try to fix it ASAP.
In the meantime, if you make line 7-9 into 1 liner, it should work.
with Diagram('Web Service', show=False, filename="my_diagram"):
Our apologies on this, please bear with us on this formatting issue. Please let us know again if it still does not work for you.
Yep, it works! Thanks so much Chialiyun.
Nice code, and I need to close this issue. Thx for all your works @msouff @chialiyun @don-harden .
hi @don-harden π , we are supporting multi-liner with Diagram
implementation (i.e. if you revert to your original code on line 7-9, the extension should work as well) on v1.0.7
. Feel free to check it out and reach out again if you encounter any issues. π
@chialiyun Thanks for your great work. I am using this extension for the diagram of my new project again. Glad to create diagrams as code via this kind VS Code extension! It's really better for me than a traditional UML Diagram.
@alanthssss happy new year and thank you for your nice words. Glad to hear that it came in useful for you.
@alanthssss happy new year and thank you for your nice words. Glad to hear that it came in useful for you.
@chialiyun Happy new year and Thank you, too, haha.
Hey, Nice to implement the preview via your kind extension!
I installed
diagrams
dependcies on my virtual environment instead of pure python3 environment, and I generated diagrams successfully. Then when I used this cool extension to preview my diagrams, it said my python3 env does not havediagrams
.I guess here I need a blank to fill the location of the virtual envitonment's interpreter instead of only 3 choices: default, python, python3, or read the interpreter which is being used by
Microsoft VS Code Python Extension
.Feel free to tell me whether my descriptions are clear enough.
Cheers!