28mm / blast-radius

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

Unexpected identifier TF #69

Open Marcus-James-Adams opened 4 years ago

Marcus-James-Adams commented 4 years ago

TF version v.12.9 azure rm running on windows 10. I cant see how to witch debug mode on tried --debug, but if you can let me know I'll try again to get more info.

127.0.0.1 - - [13/Oct/2019 16:06:46] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [13/Oct/2019 16:06:49] "GET /graph.svg HTTP/1.1" 200 - [2019-10-13 16:06:50,729] ERROR in app: Exception on /graph.json [GET] Traceback (most recent call last): File "C:\Python37\lib\site-packages\flask\app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "C:\Python37\lib\site-packages\flask\app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "C:\Python37\lib\site-packages\flask\app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "C:\Python37\lib\site-packages\flask_compat.py", line 39, in reraise raise value File "C:\Python37\lib\site-packages\flask\app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "C:\Python37\lib\site-packages\flask\app.py", line 1935, in dispatch_request return self.view_functionsrule.endpoint File "C:\Python37\lib\site-packages\blastradius\server\server.py", line 61, in graph_json tf = Terraform(os.getcwd()) File "C:\Python37\lib\site-packages\blastradius\handlers\terraform.py", line 26, in init self.config = hcl.load(config_io) File "C:\Python37\lib\site-packages\hcl\api.py", line 54, in load return loads(fp.read()) File "C:\Python37\lib\site-packages\hcl\api.py", line 66, in loads return HclParser().parse(s) File "C:\Python37\lib\site-packages\hcl\parser.py", line 326, in parse return self.yacc.parse(s, lexer=Lexer()) File "C:\Python37\lib\site-packages\ply\yacc.py", line 333, in parse return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc) File "C:\Python37\lib\site-packages\ply\yacc.py", line 1201, in parseopt_notrack tok = call_errorfunc(self.errorfunc, errtoken, self) File "C:\Python37\lib\site-packages\ply\yacc.py", line 192, in call_errorfunc r = errorfunc(token) File "C:\Python37\lib\site-packages\hcl\parser.py", line 318, in p_error raise ValueError(msg) ValueError: Line 55, column 1607: unexpected IDENTIFIER 127.0.0.1 - - [13/Oct/2019 16:06:50] "GET /graph.json HTTP/1.1" 500 -

mcdafydd commented 4 years ago

I also get this error trying to generate the json for embedded use with TF v0.12.13.

Edit: Posted too soon - I see all the other issues about pyhcl and will investigate one of the forks for now.