question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting 500 error for GET /graph.json

See original GitHub issue

Hello, my infra graph is displaying properly with the CSV but I get this error for the graph.json endpoint. Here is the command I am running.

blast-radius --port 3000 --serve --module-depth 3

127.0.0.1 - - [26/Sep/2018 02:59:50] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [26/Sep/2018 02:59:54] "GET /graph.svg HTTP/1.1" 200 -
[2018-09-26 02:59:57,836] ERROR in app: Exception on /graph.json [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.6/site-packages/blastradius/server/server.py", line 57, in graph_json
    tf = Terraform(os.getcwd())
  File "/usr/local/lib/python3.6/site-packages/blastradius/handlers/terraform.py", line 67, in __init__
    self.modules[name] = Terraform(directory=self.directory+'/'+source, settings=mod)
  File "/usr/local/lib/python3.6/site-packages/blastradius/handlers/terraform.py", line 26, in __init__
    self.config = hcl.load(config_io)
  File "/usr/local/lib/python3.6/site-packages/hcl/api.py", line 51, in load
    return loads(fp.read())
  File "/usr/local/lib/python3.6/site-packages/hcl/api.py", line 62, in loads
    return HclParser().parse(s)
  File "/usr/local/lib/python3.6/site-packages/hcl/parser.py", line 307, in parse
    return self.yacc.parse(s, lexer=Lexer())
  File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 331, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
  File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 1199, in parseopt_notrack
    tok = call_errorfunc(self.errorfunc, errtoken, self)
  File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 193, in call_errorfunc
    r = errorfunc(token)
  File "/usr/local/lib/python3.6/site-packages/hcl/parser.py", line 300, in p_error
    raise ValueError(msg)
ValueError: Line 131, column 4912: unexpected RIGHTBRACE
127.0.0.1 - - [26/Sep/2018 02:59:57] "GET /graph.json HTTP/1.1" 500 -

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
scarolancommented, Dec 20, 2019

I’ve noticed this happening on Terraform 0.12 code, which has unquoted variables as @tim-steinkuhler mentioned. It renders the graph but there are no colors and you can’t drag it around.

0reactions
ThiamSooncommented, May 13, 2020

my errors,

[2020-05-13 16:08:58,561] ERROR in app: Exception on /graph.json [GET] Traceback (most recent call last): File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 2447, in wsgi_app response = self.full_dispatch_request() File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File “/usr/local/lib/python3.7/site-packages/flask/_compat.py”, line 39, in reraise raise value File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1950, in full_dispatch_request rv = self.dispatch_request() File “/usr/local/lib/python3.7/site-packages/flask/app.py”, line 1936, in dispatch_request return self.view_functionsrule.endpoint File “/usr/local/lib/python3.7/site-packages/blastradius/server/server.py”, line 61, in graph_json tf = Terraform(os.getcwd()) File “/usr/local/lib/python3.7/site-packages/blastradius/handlers/terraform.py”, line 67, in init self.modules[name] = Terraform(directory=self.directory+‘/’+source, settings=mod) File “/usr/local/lib/python3.7/site-packages/blastradius/handlers/terraform.py”, line 26, in init self.config = hcl.load(config_io) File “/usr/local/lib/python3.7/site-packages/hcl/api.py”, line 62, in load return loads(fp.read(), export_comments=export_comments) File “/usr/local/lib/python3.7/site-packages/hcl/api.py”, line 81, in loads return HclParser().parse(s, export_comments=export_comments) File “/usr/local/lib/python3.7/site-packages/hcl/parser.py”, line 643, in parse s, lexer=Lexer(export_comments=export_comments), debug=DEBUG File “/usr/local/lib/python3.7/site-packages/hcl/ply/yacc.py”, line 503, in parse tok = self.errorfunc(errtoken) File “/usr/local/lib/python3.7/site-packages/hcl/parser.py”, line 634, in p_error raise ValueError(msg) ValueError: Line 2, column 62: unexpected ASTERISK_PERIOD; expected COMMA, IDENTIFIER, STRING, COMMENT, MULTICOMMENT, MINUS, NUMBER, FLOAT, $end, RIGHTBRACE, QMARK, EQ, NE, LT, GT, LE, GE, ADD, MULTIPLY, DIVIDE, LEFTBRACKET, LEFTPAREN 127.0.0.1 - - [13/May/2020 16:08:58] “GET /graph.json HTTP/1.1” 500 -

Read more comments on GitHub >

github_iconTop Results From Across the Web

Graph API - Followed Sites returning http error code 500
Hello,. since last Friday we are experiencing an error when invoking Graph API to retrieve sharepoint followed Sites
Read more >
How to handle 500 Internal Server Error when using JSON
A "500 Internal Server" error means the server had a problem responding to your request. You are not getting a JSON string response....
Read more >
500 Internal Server Error - Backend Server | Apigee Edge
The client application gets an HTTP status code of 500 with the message Internal Server Error as a response for API calls.
Read more >
Read return error 500 in UI for ASP.NET MVC | Telerik Forums
The difference may be coming from the difference MVC version or .NET framework version. Also, if the type is set to POST, the...
Read more >
Fixing a 500 internal server error response - Postman
A 500 Internal Server Error is an HTTP status code that indicates that the server encountered an unexpected error while processing the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found