Python SDK: 在沙箱结束时,在命令流传输过程中出现未处理的 RemoteProtocolError (TLS close_notify)
作者: AdaAibaby创建于 2026年8月20日更新于 2026年9月1日
标签bugsdkpython
Problem 1 — handle_rpc_exception passes RemoteProtocolError through unchanged:
def handle_rpc_exception(e, error_map=None):
if isinstance(e, ConnectException):
... # only handles ConnectRPC protocol errors
else:
return e # ← RemoteProtocolError returned as-is, no mappingProblem 2 — @_retry(RemoteProtocolError, 3) on call_server_stream is a no-op for streaming:
The decorator wraps a generator function. return func(*args, **kwargs) returns the generator object immediately without executing any body. The exception only occurs during iteration (inside _handle_events), outside the decorator's try/except. So the retry never fires during streaming.
内容来源: e2b-dev/E2B