René's URL Explorer Experiment


Title: `from_any_pb` gives a useless error message when the type names don't match. · Issue #711 · googleapis/python-api-core · GitHub

Open Graph Title: `from_any_pb` gives a useless error message when the type names don't match. · Issue #711 · googleapis/python-api-core

X Title: `from_any_pb` gives a useless error message when the type names don't match. · Issue #711 · googleapis/python-api-core

Description: Environment details google-api-core version: pip show google-api-core = 2.19.2 Steps to reproduce Try to decode an Any with the wrong type path. The error is like: TypeError: Could not convert `Any` to `PredictLongRunningResponse` I had ...

Open Graph Description: Environment details google-api-core version: pip show google-api-core = 2.19.2 Steps to reproduce Try to decode an Any with the wrong type path. The error is like: TypeError: Could not convert `Any...

X Description: Environment details google-api-core version: pip show google-api-core = 2.19.2 Steps to reproduce Try to decode an Any with the wrong type path. The error is like: TypeError: Could not convert `Any...

Opengraph URL: https://github.com/googleapis/python-api-core/issues/711

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`from_any_pb` gives a useless error message when the type names don't match.","articleBody":"#### Environment details\r\n\r\n  - `google-api-core` version: `pip show google-api-core` = 2.19.2\r\n\r\n#### Steps to reproduce\r\n\r\nTry to decode an `Any` with the wrong type path.  \r\n\r\nThe error is like:\r\n\r\n```\r\nTypeError: Could not convert `Any` to `PredictLongRunningResponse` \r\n```\r\n\r\nI had to go way down in the debugger to find that the actual problem was the different versions:\r\n\r\n```\r\nTypeError: Could not convert\r\n   Any[google.ai.generativelanguage.v1main.PredictLongRunningResponse] to\r\n       google.ai.generativelanguage.v1beta.PredictLongRunningResponse\r\n```\r\n\r\n#### Code example\r\n\r\nIn this Colab example, the API doesn't know what version the client library is calling with and returns an `Any` with a mismatched-version.\r\n\r\nhttps://colab.research.google.com/drive/1m6KLCvp2l1oD32cnIsaBLN5ecmbFNncI?resourcekey=0-hivajkhDg2FA5Sec3pTu4w\u0026usp=sharing\r\n\r\n#### Stack trace\r\n```\r\n\u003cipython-input-112-5c7fa9bc2888\u003e(3)\u003ccell line: 3\u003e()\r\n      1 import time\r\n      2 \r\n----\u003e 3 while not op.done():\r\n      4   time.sleep(5)\r\n      5   print('waiting...')\r\n\r\n  /usr/local/lib/python3.10/dist-packages/google/api_core/operation.py(174)done()\r\n    172             bool: True if the operation is complete, False otherwise.\r\n    173         \"\"\"\r\n--\u003e 174         self._refresh_and_update(retry)\r\n    175         return self._operation.done\r\n    176 \r\n\r\n  /usr/local/lib/python3.10/dist-packages/google/api_core/operation.py(163)_refresh_and_update()\r\n    161         if not self._operation.done:\r\n    162             self._operation = self._refresh(retry=retry) if retry else self._refresh()\r\n--\u003e 163             self._set_result_from_operation()\r\n    164 \r\n    165     def done(self, retry=None):\r\n\r\n  /usr/local/lib/python3.10/dist-packages/google/api_core/operation.py(134)_set_result_from_operation()\r\n    132 \r\n    133             if self._operation.HasField(\"response\"):\r\n--\u003e 134                 response = protobuf_helpers.from_any_pb(\r\n    135                     self._result_type, self._operation.response\r\n    136                 )\r\n\r\n\u003e /usr/local/lib/python3.10/dist-packages/google/api_core/protobuf_helpers.py(65)from_any_pb()\r\n     63     # Unpack the Any object and populate the protobuf message instance.\r\n     64     if not any_pb.Unpack(msg_pb):\r\n---\u003e 65         raise TypeError(\r\n     66             \"Could not convert {} to {}\".format(\r\n     67                 any_pb.__class__.__name__, pb_type.__name__\r\n\r\n```","author":{"url":"https://github.com/MarkDaoust","@type":"Person","name":"MarkDaoust"},"datePublished":"2024-10-01T23:51:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/711/python-api-core/issues/711"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:acf9b727-4cab-02e2-8be7-293b0b5b2f0a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB968:1FFDFF:8044F3:ADDCDA:6A4EC6E0
html-safe-nonce99cd6c79409dc9522ddce000c7cc38781f7787cc86d533857df94fe538562d24
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTY4OjFGRkRGRjo4MDQ0RjM6QUREQ0RBOjZBNEVDNkUwIiwidmlzaXRvcl9pZCI6Ijg1MTkwMjYzMzcyODg5OTY1NzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8d1d710c28af832ac8265994285e3b0d332d144bf1f2ea62165e302a542656ed
hovercard-subject-tagissue:2560398552
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-api-core/711/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e100eaa604213eafad8b9408ae41ae80985489b33bccd28e78fc25b105a95e89/googleapis/python-api-core/issues/711
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e100eaa604213eafad8b9408ae41ae80985489b33bccd28e78fc25b105a95e89/googleapis/python-api-core/issues/711
og:image:altEnvironment details google-api-core version: pip show google-api-core = 2.19.2 Steps to reproduce Try to decode an Any with the wrong type path. The error is like: TypeError: Could not convert `Any...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameMarkDaoust
hostnamegithub.com
expected-hostnamegithub.com
None41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c
turbo-cache-controlno-preview
go-importgithub.com/googleapis/python-api-core git https://github.com/googleapis/python-api-core.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id226992456
octolytics-dimension-repository_nwogoogleapis/python-api-core
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id226992456
octolytics-dimension-repository_network_root_nwogoogleapis/python-api-core
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee6a744804e8e70f97b4d5a18a94dcc63db22f97a
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/googleapis/python-api-core/issues/711#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-api-core%2Fissues%2F711
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-api-core%2Fissues%2F711
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fpython-api-core
Reloadhttps://github.com/googleapis/python-api-core/issues/711
Reloadhttps://github.com/googleapis/python-api-core/issues/711
Reloadhttps://github.com/googleapis/python-api-core/issues/711
Please reload this pagehttps://github.com/googleapis/python-api-core/issues/711
googleapis https://github.com/googleapis
python-api-corehttps://github.com/googleapis/python-api-core
Notifications https://github.com/login?return_to=%2Fgoogleapis%2Fpython-api-core
Fork 97 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-api-core
Star 144 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-api-core
Code https://github.com/googleapis/python-api-core
Issues 0 https://github.com/googleapis/python-api-core/issues
Pull requests 0 https://github.com/googleapis/python-api-core/pulls
Actions https://github.com/googleapis/python-api-core/actions
Projects https://github.com/googleapis/python-api-core/projects
Security and quality 0 https://github.com/googleapis/python-api-core/security
Insights https://github.com/googleapis/python-api-core/pulse
Code https://github.com/googleapis/python-api-core
Issues https://github.com/googleapis/python-api-core/issues
Pull requests https://github.com/googleapis/python-api-core/pulls
Actions https://github.com/googleapis/python-api-core/actions
Projects https://github.com/googleapis/python-api-core/projects
Security and quality https://github.com/googleapis/python-api-core/security
Insights https://github.com/googleapis/python-api-core/pulse
#712https://github.com/googleapis/python-api-core/pull/712
from_any_pb gives a useless error message when the type names don't match.https://github.com/googleapis/python-api-core/issues/711#top
#712https://github.com/googleapis/python-api-core/pull/712
https://github.com/parthea
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/python-api-core/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-api-core/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/MarkDaoust
MarkDaousthttps://github.com/MarkDaoust
on Oct 1, 2024https://github.com/googleapis/python-api-core/issues/711#issue-2560398552
https://colab.research.google.com/drive/1m6KLCvp2l1oD32cnIsaBLN5ecmbFNncI?resourcekey=0-hivajkhDg2FA5Sec3pTu4w&usp=sharinghttps://colab.research.google.com/drive/1m6KLCvp2l1oD32cnIsaBLN5ecmbFNncI?resourcekey=0-hivajkhDg2FA5Sec3pTu4w&usp=sharing
partheahttps://github.com/parthea
priority: p2Moderately-important priority. Fix may not be included in next release.https://github.com/googleapis/python-api-core/issues?q=state%3Aopen%20label%3A%22priority%3A%20p2%22
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.https://github.com/googleapis/python-api-core/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.