We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Since there are too many synchronous methods in my chat program, it is difficult to change them all to asynchronous methods, so I use
def run(self): loop = asyncio.new_event_loop() asyncio.set_event_loop(loop)
# initialization loop.run_until_complete(self.init_mcp_chat_server()) # list tool list_tools, self._tools_description = loop.run_until_complete(self._init_prompt_tools()) # close loop.run_until_complete(self.mcp_server_cleanup())
I have verified that the correct data can be obtained,But when I close:loop.run_until_complete(self.mcp_server_cleanup()) ,Will report an error :
Attempted to exit cancel scope in a different task than it was entered in
How should I solve this problem?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Since there are too many synchronous methods in my chat program, it is difficult to change them all to asynchronous methods, so I use
def run(self):
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
I have verified that the correct data can be obtained,But when I close:loop.run_until_complete(self.mcp_server_cleanup()) ,Will report an error :
Attempted to exit cancel scope in a different task than it was entered in
How should I solve this problem?
The text was updated successfully, but these errors were encountered: