You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of protobuf and what language are you using?
Version: main
Language: Python
What operating system (Linux, Windows, ...) and version?
All
What runtime / compiler are you using (e.g., python version or gcc version)
Not applicable
What did you do?
Steps to reproduce the behavior:
Deploy gRPC service that does not have a package
Use reflection and DescriptorPool to find service by name
KeyError is being raised
What did you expect to see
It should be possible to find a service even though it does not have a pckage
I have debugged through the code and the culprit is this code that assumes that package name is not empty. I happened to have an example where this was not the case.
The fix I think is trivial - just check if package is empty or not before concatenating it with an object name.
The text was updated successfully, but these errors were encountered:
Please note the dot in the .Service which is caused by missing package, while other symbols from the same package don't have it - it's taken care of by _ExtractSymbols which handles empty package already.
I have submitted a PR if you want to take a look and help me get it through.
What version of protobuf and what language are you using?
Version: main
Language: Python
What operating system (Linux, Windows, ...) and version?
All
What runtime / compiler are you using (e.g., python version or gcc version)
Not applicable
What did you do?
Steps to reproduce the behavior:
DescriptorPool
to find service by nameWhat did you expect to see
It should be possible to find a service even though it does not have a pckage
I have debugged through the code and the culprit is this code that assumes that package name is not empty. I happened to have an example where this was not the case.
The fix I think is trivial - just check if package is empty or not before concatenating it with an object name.
The text was updated successfully, but these errors were encountered: