-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(cli): Disable auto-reload feature on Windows system #415
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
fix(cli): Disable auto-reload feature on Windows system #415
Conversation
Fixed the issue caused by the auto-reload feature when running the CLI tool on Windows system. By detecting the operating system type, the auto-reload is disabled on Windows system to avoid potential errors: When mcp is asynchronously loaded, it will enter the _make_subprocess_transport NotImplementedError logic due to uvicorn reload=True in fastapi.
Thanks for the fix @nneverwei ! I'd suggest we add an option in the CLI to enable or disable the reload feature. So users(esp. windows) users can disable this if they come across this bug. |
7589655
to
d348f19
Compare
…users(esp. windows) can disable this if they come across the '_make_subprocess_transport NotImplementedError' bug on windows.
👍nice |
it might be useful to check if the platform is windows (os.name or sys.platform) and set the default for reload dynamically based on that. |
Thanks for the addition! |
Could someone help update the documentation(https://github.com/google/adk-docs) on not to reoload for windows? |
Copybara import of the project: -- a4a998d by 魏超 <[email protected]>: fix(cli): Disable auto-reload feature on Windows system Fixed the issue caused by the auto-reload feature when running the CLI tool on Windows system. By detecting the operating system type, the auto-reload is disabled on Windows system to avoid potential errors: When mcp is asynchronously loaded, it will enter the _make_subprocess_transport NotImplementedError logic due to uvicorn reload=True in fastapi. -- 46c9bb6 by 魏超 <[email protected]>: add an option in the CLI to enable or disable the reload feature. So users(esp. windows) can disable this if they come across the '_make_subprocess_transport NotImplementedError' bug on windows. COPYBARA_INTEGRATE_REVIEW=#415 from nneverwei:win-subprocess-NotImplError-with-mcp fbb9ab0 PiperOrigin-RevId: 756360981
…e. So users(esp. windows) can disable this if they come across the '_make_subprocess_transport NotImplementedError' bug on windows. [issue-#414](google/adk-python#414) [pull-#415](google/adk-python#415)
|
merged in 85ccacb. thanks! |
Fixed the issue caused by the auto-reload feature when running the CLI tool on Windows system. By detecting the operating system type, the auto-reload is disabled on Windows system to avoid potential errors: When mcp is asynchronously loaded, it will enter the _make_subprocess_transport NotImplementedError logic due to uvicorn reload=True in fastapi.
Although disabling the reload feature of uvicorn on Windows may result in some loss of functionality, as of now, MCP has large-scale usage scenarios, and it should be prioritized to ensure that MCP can be used normally
issue-#414
issue-#387