Skip to content

Commit e2604ce

Browse files
author
Steven Anton
committed
Encode to UTF-8
1 parent 0a63eec commit e2604ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sagemaker/local/local_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ def invoke_endpoint(
469469
if InferenceId is not None:
470470
headers["X-Amzn-SageMaker-Inference-Id"] = InferenceId
471471

472-
r = self.http.request("POST", url, body=Body, preload_content=False, headers=headers)
472+
r = self.http.request("POST", url, body=Body.encode("utf-8"), preload_content=False, headers=headers)
473473

474474
return {"Body": r, "ContentType": Accept}
475475

0 commit comments

Comments
 (0)