28mm / blast-radius

Interactive visualizations of Terraform dependency graphs using d3.js
https://28mm.github.io/blast-radius-docs/
MIT License
2.04k stars 257 forks source link

New project #51

Closed pastephens closed 3 years ago

pastephens commented 5 years ago

Traceback (most recent call last): File "/usr/bin/blast-radius", line 14, in from blastradius.handlers.dot import DotGraph, Format, DotNode File "/usr/lib/python3.4/site-packages/blastradius/handlers/dot.py", line 394 self.fmt = {self.fmt, kwargs} ^ SyntaxError: invalid syntax

pastephens commented 5 years ago

I get that same error in multiple terraform init-ed projects.

pastephens commented 5 years ago

graphviz-2.30.1-21.el7.x86_64

28mm commented 5 years ago

Hi @pastephens

blast-radius works with python 3.5 or newer. The {**dict, **dict} syntax cited above was introduced in that release. In theory setup.py is configured to check for this requirement, but I'm not sure what happens when a release >= 3.5 is installed but the default python3 is < 3.5.

pastephens commented 5 years ago

Thanks for the tip. After setting up a python3.6 virtualenv, and manually removing blastradius from the 3.4 lib/site-packages, I get a very strange outcome:

(python36) -1 stephens1@ops7ws01:~/code/ewp-virtual-hosting-edge/terraform [master L|✚ 1]> pip install blastradius
Requirement already satisfied: blastradius in /home/stephens1/python36/lib/python3.6/site-packages (0.1.18)
Requirement already satisfied: Flask in /home/stephens1/python36/lib/python3.6/site-packages (from blastradius) (1.0.2)
Requirement already satisfied: jinja2 in /home/stephens1/python36/lib/python3.6/site-packages (from blastradius) (2.10)
Requirement already satisfied: pyhcl>=0.3.10 in /home/stephens1/python36/lib/python3.6/site-packages (from blastradius) (0.3.10)
Requirement already satisfied: requests in /home/stephens1/python36/lib/python3.6/site-packages (from blastradius) (2.20.1)
Requirement already satisfied: BeautifulSoup4 in /home/stephens1/python36/lib/python3.6/site-packages (from blastradius) (4.6.3)
Requirement already satisfied: click>=5.1 in /home/stephens1/python36/lib/python3.6/site-packages (from Flask->blastradius) (7.0)
Requirement already satisfied: Werkzeug>=0.14 in /home/stephens1/python36/lib/python3.6/site-packages (from Flask->blastradius) (0.14.1)
Requirement already satisfied: itsdangerous>=0.24 in /home/stephens1/python36/lib/python3.6/site-packages (from Flask->blastradius) (1.1.0)
Requirement already satisfied: MarkupSafe>=0.23 in /home/stephens1/python36/lib/python3.6/site-packages (from jinja2->blastradius) (1.1.0)
Requirement already satisfied: ply==3.10 in /home/stephens1/python36/lib/python3.6/site-packages (from pyhcl>=0.3.10->blastradius) (3.10)
Requirement already satisfied: idna<2.8,>=2.5 in /home/stephens1/python36/lib/python3.6/site-packages (from requests->blastradius) (2.7)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /home/stephens1/python36/lib/python3.6/site-packages (from requests->blastradius) (1.24.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/stephens1/python36/lib/python3.6/site-packages (from requests->blastradius) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /home/stephens1/python36/lib/python3.6/site-packages (from requests->blastradius) (2018.10.15)
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(python36) ✔ stephens1@ops7ws01:~/code/ewp-virtual-hosting-edge/terraform [master L|✚ 1]> blast-radius --serve
Traceback (most recent call last):
  File "/usr/bin/blast-radius", line 14, in <module>
    from blastradius.handlers.dot import DotGraph, Format, DotNode
ImportError: No module named 'blastradius'
(python36) ✘-1 stephens1@ops7ws01:~/code/ewp-virtual-hosting-edge/terraform [master L|✚ 1]> python
Python 3.6.6 (default, Aug 13 2018, 18:24:23)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import blastradius
>>> exit()
(python36) ✔ stephens1@ops7ws01:~/code/ewp-virtual-hosting-edge/terraform [master L|✚ 1]> blast-radius --serve
Traceback (most recent call last):
  File "/usr/bin/blast-radius", line 14, in <module>
    from blastradius.handlers.dot import DotGraph, Format, DotNode
ImportError: No module named 'blastradius'
(python36) ✘-1 stephens1@ops7ws01:~/code/ewp-virtual-hosting-edge/terraform [master L|✚ 1]> which blast-radius
~/python36/bin/blast-radius
(python36) ✔ stephens1@ops7ws01:~/code/ewp-virtual-hosting-edge/terraform [master L|✚ 1]>