Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed

Conversation

nneverwei
Copy link
Contributor

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

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.
@hangfei
Copy link
Collaborator

hangfei commented Apr 28, 2025

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.

@hangfei hangfei self-requested a review April 28, 2025 02:56
@nneverwei nneverwei force-pushed the win-subprocess-NotImplError-with-mcp branch from 7589655 to d348f19 Compare April 29, 2025 03:31
…users(esp. windows) can disable this if they come across the '_make_subprocess_transport NotImplementedError' bug on windows.
@510myRday
Copy link

👍nice

@BenMawnMahlauNBTC
Copy link

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.

@hangfei
Copy link
Collaborator

hangfei commented May 8, 2025

Thanks for the addition!

@hangfei
Copy link
Collaborator

hangfei commented May 8, 2025

Could someone help update the documentation(https://github.com/google/adk-docs) on not to reoload for windows?

@hangfei hangfei added the ready to pull for importing back to Google label May 8, 2025
copybara-service bot pushed a commit that referenced this pull request May 8, 2025
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
nneverwei added a commit to nneverwei/adk-docs that referenced this pull request May 13, 2025
…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)
@nneverwei
Copy link
Contributor Author

Could someone help update the documentation(https://github.com/google/adk-docs) on not to reoload for windows?

google/adk-docs#252

@hangfei
Copy link
Collaborator

hangfei commented May 30, 2025

merged in 85ccacb. thanks!

@hangfei hangfei closed this May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to pull for importing back to Google
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants