[Bugfix] Preserve original ImportError in gRPC server entrypoint#38673
Open
CatherineSue wants to merge 1 commit intovllm-project:mainfrom
Open
[Bugfix] Preserve original ImportError in gRPC server entrypoint#38673CatherineSue wants to merge 1 commit intovllm-project:mainfrom
CatherineSue wants to merge 1 commit intovllm-project:mainfrom
Conversation
Change `from None` to `from e` so the original traceback is visible when smg-grpc-servicer is installed but has a broken import (e.g. version mismatch, moved function). Previously the real error was swallowed and replaced with a generic "install the package" message. Signed-off-by: Chang Su <chang.s.su@oracle.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request improves the error handling for gRPC-related imports in vllm/entrypoints/grpc_server.py. The updated logic now captures the original ImportError and provides a more descriptive error message to help users diagnose potential version mismatches or installation issues. I have no feedback to provide as there are no review comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Fix misleading error message when
smg-grpc-serviceris installed but has a broken internal import (e.g. version mismatch between servicer and vllm, or a missing transitive dependency like grpcio).Currently
from Nonesuppresses the original traceback, so the user only sees:This is misleading when the package IS installed but an internal import fails — the real error is hidden.
Test Plan
Manual verification: introduce a broken import inside
smg_grpc_servicerand confirm the chained traceback is now visible.Test Result
After this change, the original
ImportErroris chained and visible: