Skip to content
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

Unable to Coerce return values when they are Protos #78

Open
kmaphoenix opened this issue Apr 17, 2024 · 0 comments
Open

Unable to Coerce return values when they are Protos #78

kmaphoenix opened this issue Apr 17, 2024 · 0 comments
Labels
component:examples Issues/PR referencing examples folder status:triaged Issue/PR triaged to the corresponding sub-team type:bug Something isn't working

Comments

@kmaphoenix
Copy link

TLDR

When calling a function that returns a proto (or list of protos), a ValueError is thrown because it cannot coerce the results.

image

Potential Fix

I'm assuming the result from the function call needs to be in some standard python type (i.e. list, str, int, etc.)
Instead of attempting to coerce each field in the proto, can we simply return the entire proto as a string?

If you see here, I've written a wrapper method around the original, where I simply take each proto and coerce to str.
The function call is able to then work properly with the string format.

image

@singhniraj08 singhniraj08 added type:bug Something isn't working status:triaged Issue/PR triaged to the corresponding sub-team component:examples Issues/PR referencing examples folder labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:examples Issues/PR referencing examples folder status:triaged Issue/PR triaged to the corresponding sub-team type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants