TwoRavens / TwoRavens

A web application for data exploration, machine learning and statistical analysis, model construction and meta analysis tools, that integrates with data repositories including Dataverse.
Apache License 2.0
22 stars 1 forks source link

gRPC: Update error catching for streaming responses #24

Closed raprasad closed 6 years ago

raprasad commented 7 years ago

Currently calls like createpipelines expect streaming responses.

But need to catch error messages (e.g. actual exception, potential unary response?)

raprasad commented 7 years ago
 Internal Server Error: /d3m-service/createpipeline
tworavens_1     | Traceback (most recent call last):
tworavens_1     |   File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/exception.py", line 41, in inner
tworavens_1     |     response = get_response(request)
tworavens_1     |   File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py", line 187, in _get_response
tworavens_1     |     response = self.process_exception_by_middleware(e, request)
tworavens_1     |   File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py", line 185, in _get_response
tworavens_1     |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
tworavens_1     |   File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
tworavens_1     |     return view_func(*args, **kwargs)
tworavens_1     |   File "/var/webapps/TwoRavens/tworaven_apps/ta2_interfaces/views.py", line 170, in view_create_pipeline
tworavens_1     |     json_str = pipeline_create(raven_data_or_err)
tworavens_1     |   File "/var/webapps/TwoRavens/tworaven_apps/ta2_interfaces/req_pipeline_create.py", line 103, in pipeline_create
tworavens_1     |     result_str = '['+', '.join(results)+']'
tworavens_1     |   File "/usr/local/lib/python3.5/dist-packages/grpc/_channel.py", line 348, in __next__
tworavens_1     |     return self._next()
tworavens_1     |   File "/usr/local/lib/python3.5/dist-packages/grpc/_channel.py", line 342, in _next
tworavens_1     |     raise self
tworavens_1     | grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with (StatusCode.UNKNOWN, Exception iterating responses: [Errno 2] No such file or directory: '/home/data/d3m/o_196seed/data/trainDatamerged.tsv/dataSchema.json')>
tworavens_1     | [17/Oct/2017 18:22:05] "POST /d3m-service/createpipeline HTTP/1.1" 500 15527
tworavens_1     | [17/Oct/2017 18:22:05] "POST /d3m-service/createpipeline HTTP/1.1" 500 15527
raprasad commented 6 years ago

done