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

Fresh install ubuntu error #20

Closed guidorugo closed 5 years ago

guidorugo commented 6 years ago

Blast Radius fresh install on ubuntu is failing to execute.

terraform-repo >pip install BlastRadius --no-cache-dir                                                                                                                                                                                                         16:41:19

Collecting BlastRadius
  Downloading BlastRadius-0.1.10.tar.gz (560kB)
    100% |████████████████████████████████| 563kB 772kB/s 
Collecting BeautifulSoup4 (from BlastRadius)
  Downloading beautifulsoup4-4.6.0-py2-none-any.whl (86kB)
    100% |████████████████████████████████| 92kB 1.1MB/s 
Collecting Flask (from BlastRadius)
  Downloading Flask-0.12.2-py2.py3-none-any.whl (83kB)
    100% |████████████████████████████████| 92kB 959kB/s 
Collecting jinja2 (from BlastRadius)
  Downloading Jinja2-2.10-py2.py3-none-any.whl (126kB)
    100% |████████████████████████████████| 133kB 996kB/s 
Collecting pyhcl (from BlastRadius)
  Downloading pyhcl-0.3.9.tar.gz
Collecting requests (from BlastRadius)
  Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
    100% |████████████████████████████████| 92kB 1.3MB/s 
Collecting itsdangerous>=0.21 (from Flask->BlastRadius)
  Downloading itsdangerous-0.24.tar.gz (46kB)
    100% |████████████████████████████████| 51kB 1.5MB/s 
Collecting Werkzeug>=0.7 (from Flask->BlastRadius)
  Downloading Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
    100% |████████████████████████████████| 327kB 976kB/s 
Collecting click>=2.0 (from Flask->BlastRadius)
  Downloading click-6.7-py2.py3-none-any.whl (71kB)
    100% |████████████████████████████████| 71kB 1.2MB/s 
Collecting MarkupSafe>=0.23 (from jinja2->BlastRadius)
  Downloading MarkupSafe-1.0.tar.gz
Collecting ply==3.10 (from pyhcl->BlastRadius)
  Downloading ply-3.10.tar.gz (150kB)
    100% |████████████████████████████████| 153kB 988kB/s 
Collecting idna<2.7,>=2.5 (from requests->BlastRadius)
  Downloading idna-2.6-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 1.4MB/s 
Collecting urllib3<1.23,>=1.21.1 (from requests->BlastRadius)
  Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
    100% |████████████████████████████████| 133kB 1.2MB/s 
Collecting certifi>=2017.4.17 (from requests->BlastRadius)
  Downloading certifi-2018.1.18-py2.py3-none-any.whl (151kB)
    100% |████████████████████████████████| 153kB 1.1MB/s 
Collecting chardet<3.1.0,>=3.0.2 (from requests->BlastRadius)
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 1.4MB/s 
Installing collected packages: BeautifulSoup4, itsdangerous, MarkupSafe, jinja2, Werkzeug, click, Flask, ply, pyhcl, idna, urllib3, certifi, chardet, requests, BlastRadius
  Running setup.py install for itsdangerous ... done
  Running setup.py install for MarkupSafe ... done
  Running setup.py install for ply ... done
  Running setup.py install for pyhcl ... done
  Running setup.py install for BlastRadius ... done
Successfully installed BeautifulSoup4-4.6.0 BlastRadius-0.1.10 Flask-0.12.2 MarkupSafe-1.0 Werkzeug-0.14.1 certifi-2018.1.18 chardet-3.0.4 click-6.7 idna-2.6 itsdangerous-0.24 jinja2-2.10 ply-3.10 pyhcl-0.3.9 requests-2.18.4 urllib3-1.22

user >cd Documents/Work/terraform-repo/                                                                                                                                                                                                                   16:36:15

terraform-repo >blast-radius --serve .                                                                                                                                                                                                                         16:36:18

Traceback (most recent call last):
  File "/usr/bin/blast-radius", line 14, in <module>
    from blastradius.handlers.dot import DotGraph, Format, DotNode
  File "/home/user/.local/lib/python2.7/site-packages/blastradius/handlers/dot.py", line 391
    print('Error processing format param: ' + 'p', file=sys.stderr)
                                                       ^
SyntaxError: invalid syntax

terraform-repo >pip --version 16:36:26

ppip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7) terraform-repo >python --version 16:38:01

Python 2.7.14 terraform-repo >lsb_release -a 16:38:02 No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 17.10 Release: 17.10 Codename: artful

28mm commented 6 years ago

Hi @guidorugo,

Thanks for reporting!

I believe the issue is with the python version used. Blast Radius requires v3.5 or later, however the docs aren’t explicit about this, and the setup script doesn’t check.

An easy alternative is to use the docker image, as described in the readme.

Holding this issue open, because the docs really ought to mention this...

sbkg0002 commented 6 years ago

Got the same error on CentOS 7.4 with Python 3.6. Changed #!/usr/bin/python3.4 to use 3.6, but no juice.

28mm commented 6 years ago

Hey @sbkg0002

I'm planning some long overdue fix-ups in this area, for the weekend. Recommend using the Docker image as an interim solution, since it hides all of the nastiness of Python versioning.

sbkg0002 commented 6 years ago

Thanks for the feedback and work. Still have the workspace impedement for now, so I'll have to wait.