You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an error while trying to follow the quick start guide for the library. The error occurs when importing the Diagram class from the diagrams module.
Steps to Reproduce
Install Graphviz (already done)
Install diagrams using poetry: poetry add diagrams
Create a Python file with the following content:
fromdiagramsimportCluster, Diagram
Run the python file: poetry run python3 main.py
Traceback (most recent call last):
File "/Users/duc.nguyen/docs/main.py", line 1, in <module>
from diagrams import Cluster, Diagram
File "/Users/duc.nguyen/docs/.venv/lib/python3.9/site-packages/diagrams/__init__.py", line 40, in <module>
class Diagram:
File "/Users/duc.nguyen/docs/.venv/lib/python3.9/site-packages/diagrams/__init__.py", line 85, in Diagram
outformat: str | list[str] = "png",
TypeError: unsupported operand type(s) for |: 'type' and 'types.GenericAlias'
The text was updated successfully, but these errors were encountered:
henry@master python -c "from diagrams import Diagram"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/henry/src/miniconda3/lib/python3.8/site-packages/diagrams/__init__.py", line 40, in <module>
class Diagram:
File "/Users/henry/src/miniconda3/lib/python3.8/site-packages/diagrams/__init__.py", line 85, in Diagram
outformat: Union[str, list[str]] = "png",
TypeError: 'type' object is not subscriptable
I'm encountering an error while trying to follow the quick start guide for the library. The error occurs when importing the Diagram class from the diagrams module.
Steps to Reproduce
poetry add diagrams
poetry run python3 main.py
The text was updated successfully, but these errors were encountered: