Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response Code: 502 - Content: b"'str' object has no attribute 'tolist'" #64

Open
CliveRobson opened this issue Apr 26, 2022 · 0 comments

Comments

@CliveRobson
Copy link

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)
in
7 })
8
----> 9 output = service.run(input_payload)
10
11 print(output)

/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'""
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant