Response Code: 502 - Content: b"'str' object has no attribute 'tolist'"
when i tried running this code i got this error, kindly assist on it import json
input_payload = json.dumps({ 'data': [[34.927778, 0.24, 7.3899, 83, 16.1000, 1016.51, 1]], 'method': 'predict' # If you have a classification model, you can get probabilities by changing this to 'predict_proba'. })
output = service.run(input_payload)
print(output)
error :
Received bad response from service. More information can be found by calling .get_logs() on the webservice object.
Response Code: 502
Headers: {'Connection': 'keep-alive', 'Content-Length': '38', 'Content-Type': 'text/html; charset=utf-8', 'Date': 'Tue, 26 Apr 2022 05:35:50 GMT', 'Server': 'nginx/1.10.3 (Ubuntu)', 'X-Ms-Request-Id': 'd84f9266-f41c-4587-a3e9-56b482cccc80', 'X-Ms-Run-Function-Failed': 'True'}
Content: b"'str' object has no attribute 'tolist'"
WebserviceException Traceback (most recent call last)
/anaconda/envs/azureml_py38/lib/python3.8/site-packages/azureml/core/webservice/aci.py in run(self, input_data)
398 return resp.json()
399 else:
--> 400 raise WebserviceException('Received bad response from service. More information can be found by calling '
401 '.get_logs() on the webservice object.\n'
402 'Response Code: {}\n'
WebserviceException: WebserviceException:
Message: Received bad response from service. More information can be found by calling .get_logs() on the webservice object.
Response Code: 502
Headers: {'Connection': 'keep-alive', 'Content-Length': '38', 'Content-Type': 'text/html; charset=utf-8', 'Date': 'Tue, 26 Apr 2022 05:35:50 GMT', 'Server': 'nginx/1.10.3 (Ubuntu)', 'X-Ms-Request-Id': 'd84f9266-f41c-4587-a3e9-56b482cccc80', 'X-Ms-Run-Function-Failed': 'True'}
Content: b"'str' object has no attribute 'tolist'"
InnerException None
ErrorResponse
{
"error": {
"message": "Received bad response from service. More information can be found by calling .get_logs() on the webservice object.\nResponse Code: 502\nHeaders: {'Connection': 'keep-alive', 'Content-Length': '38', 'Content-Type': 'text/html; charset=utf-8', 'Date': 'Tue, 26 Apr 2022 05:35:50 GMT', 'Server': 'nginx/1.10.3 (Ubuntu)', 'X-Ms-Request-Id': 'd84f9266-f41c-4587-a3e9-56b482cccc80', 'X-Ms-Run-Function-Failed': 'True'}\nContent: b"'str' object has no attribute 'tolist'""
}
}