- Notifications
You must be signed in to change notification settings - Fork95
fix: ImproveAny decode error#712
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Was:TypeError: Could not convert Any to PredictLongRunningResponseNow:TypeError: Could not convert Any[google.ai.generativelanguage.v1main.PredictLongRunningResponse] to google.ai.generativelanguage.v1beta.PredictLongRunningResponse
ohmayr commentedOct 4, 2024
@MarkDaoust Hmm looking at your comment above, is this right syntax |
Uh oh!
There was an error while loading.Please reload this page.
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
tests/unit/test_protobuf_helpers.py Outdated
| withpytest.raises( | ||
| TypeError, | ||
| match=re.escape( | ||
| "Could not convert `google.protobuf.any_pb2.Any` with underlying type `google.type.Date` to `google.type.TimeOfDay`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Am I reading this correct or should it instead be the following? (My assumption is that the underlying type should beAny).
| "Could not convert `google.protobuf.any_pb2.Any` with underlying type `google.type.Date` to `google.type.TimeOfDay`" | |
| "Could not convert `google.type.Date` with underlying type `google.protobuf.any_pb2.Any` to `google.type.TimeOfDay`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed indc33849
Uh oh!
There was an error while loading.Please reload this page.
Was (useless):
Now:
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
from_any_pbgives a useless error message when the type names don't match. #711Fixes#711 🦕