python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

Error in post_writer: Server disconnected without sending a response.

Open WuxySZ opened this issue 1 year ago • 2 comments

Error in post_writer: Server disconnected without sending a response.

call_tool -> wait result but report error , Error in post_writer: Server disconnected without sending a response. and call_tool not return or exception!!!

code: logging.info(f"call_tool > s {self.url} {tool_name} {params}") if not self.is_connected: return None try: result = await self.session.call_tool(tool_name, params)
logging.info(f"call_tool >>> e {self.url} {tool_name}") return result except Exception as e: logging.error(f"call_tool >>> error {self.url} {tool_name}: {e}") return None

log: 06/09/2025 17:32:25 PM - 10832 - INFO call_tool > s http://192.168.22.143:38088/sse inject_event {'sn': 'ITSL0102W0001230201000042', 'type': '3', 'content': '{"__name": "itee.js.switch_scene", "value": 7}'}
06/09/2025 17:32:25 PM - 10832 - ERROR - Error in post_writer: Server disconnected without sending a response.

call_tool is stuck, I hope to receive an exception or error return

thanks!

WuxySZ avatar Jun 09 '25 10:06 WuxySZ

Hello, have you found a solution? I've also encountered this issue. Once this error is triggered, it will cause the tool call to be unable to return and enter a permanent waiting state.

jinwuZhu avatar Aug 22 '25 03:08 jinwuZhu

Hi @WuxySZ thanks for reporting - could you provide a code snippet we can run to reproduce the issue you're facing?

felixweinberger avatar Oct 03 '25 10:10 felixweinberger