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
When a route has no geometry yet, our API cannot handle it properly: we then get a 500 INTERNAL SERVER ERROR
our python part returns
[2019-03-28 13:27:37,855] ERROR in app: Exception on /routes/3383511 [GET]
api_1 | Traceback (most recent call last):
api_1 | File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 1813, in full_dispatch_request
api_1 | rv = self.dispatch_request()
api_1 | File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 1799, in dispatch_request
api_1 | return self.view_functions[rule.endpoint](**req.view_args)
api_1 | File "/usr/local/lib/python3.5/site-packages/flask_restful/__init__.py", line 458, in wrapper
api_1 | resp = resource(*args, **kwargs)
api_1 | File "/usr/local/lib/python3.5/site-packages/flask/views.py", line 88, in view
api_1 | return self.dispatch_request(*args, **kwargs)
api_1 | File "/usr/local/lib/python3.5/site-packages/flask_restful/__init__.py", line 573, in dispatch_request
api_1 | resp = meth(*args, **kwargs)
api_1 | File "/api/api.py", line 247, in get
api_1 | r["geometry"] = ast.literal_eval(get_route_geojson(route_id))
api_1 | File "/usr/local/lib/python3.5/ast.py", line 84, in literal_eval
api_1 | return _convert(node_or_string)
api_1 | File "/usr/local/lib/python3.5/ast.py", line 83, in _convert
api_1 | raise ValueError('malformed node or string: ' + repr(node))
api_1 | ValueError: malformed node or string: None
api_1 | 172.25.0.5 - - [28/Mar/2019:13:27:37 +0000] "GET /routes/3383511 HTTP/1.0" 500 37 "-" "Wget/1.17.1 (linux-gnu)"
Not sure about what we should return for the geojson part, but I think we should not fail on this, and be able to return a partial answer (with at least the route metadata)
The text was updated successfully, but these errors were encountered:
When a route has no geometry yet, our API cannot handle it properly: we then get a 500 INTERNAL SERVER ERROR
our python part returns
Not sure about what we should return for the geojson part, but I think we should not fail on this, and be able to return a partial answer (with at least the route metadata)
The text was updated successfully, but these errors were encountered: