-
Notifications
You must be signed in to change notification settings - Fork 89
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
fix: Improve Any
decode error
#712
Conversation
Was: TypeError: Could not convert Any to PredictLongRunningResponse Now: TypeError: Could not convert Any[google.ai.generativelanguage.v1main.PredictLongRunningResponse] to google.ai.generativelanguage.v1beta.PredictLongRunningResponse
@MarkDaoust Hmm looking at your comment above, is this right syntax |
🤖 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
with pytest.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 be Any
).
"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 in dc33849
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_pb
gives a useless error message when the type names don't match. #711Fixes #711 🦕