René's URL Explorer Experiment


Title: Async method calls do not show/print exceptions · Issue #97 · python-sdbus/python-sdbus · GitHub

Open Graph Title: Async method calls do not show/print exceptions · Issue #97 · python-sdbus/python-sdbus

X Title: Async method calls do not show/print exceptions · Issue #97 · python-sdbus/python-sdbus

Description: If the exception occur in a method callback, the exception is not shown: import asyncio import sdbus class Test(sdbus.DbusInterfaceCommonAsync, interface_name="org.test"): @sdbus.dbus_method_async(result_signature="u") async def open(sel...

Open Graph Description: If the exception occur in a method callback, the exception is not shown: import asyncio import sdbus class Test(sdbus.DbusInterfaceCommonAsync, interface_name="org.test"): @sdbus.dbus_method_async(...

X Description: If the exception occur in a method callback, the exception is not shown: import asyncio import sdbus class Test(sdbus.DbusInterfaceCommonAsync, interface_name="org.test"): @sdbus.dbus_met...

Opengraph URL: https://github.com/python-sdbus/python-sdbus/issues/97

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Async method calls do not show/print exceptions","articleBody":"If the exception occur in a method callback, the exception is not shown:\n\n```python\nimport asyncio\nimport sdbus\n\nclass Test(sdbus.DbusInterfaceCommonAsync, interface_name=\"org.test\"):\n    @sdbus.dbus_method_async(result_signature=\"u\")\n    async def open(self) -\u003e int:\n        print(\"Open call\")\n        raise ValueError(\"Nooo\")\n\ntest = Test()\n\nasync def startup() -\u003e None:\n    await sdbus.request_default_bus_name_async('org.example.test')\n    test.export_to_dbus(\"/\")\n\nloop = asyncio.new_event_loop()\nloop.run_until_complete(startup())\nloop.run_until_complete(asyncio.sleep(10))\nprint(\"Done\")\n```\n\n```console\n$ ./test.py\nOpen call\nDone\n```\n\n```console\n$ gdbus call --session --dest org.example.test --object-path / --method org.test.Open\nError: GDBus.Error:org.freedesktop.DBus.Error.Failed:\n```\n\nIt is visible on the client side that something was wrong `DBus.Error.Failed`, but it's hard to tell what was wrong. It would be nice to have a traceback printed in case of an exception in a D-Bus API handler (method or property). However, I'm not sure whether that is intentional or a bug?\n\nAs a workaround I can wrap method/property code in a try/except block, but I think that it would be nicer to have a traceback in case of non-DBus exception. If someone would like to return an error from a method/property, a dedicated DBus exception should be used. What do you think? Otherwise it's really, reaaaaalllyyy hard to debug issues (e.g. a simple typo) in a program based on sdbus library.\n\nIf not, the returned D-Bus error should at least have the `ValueError`'s message included.\n\n#### Setup\n\nsdbus was installed via PIP:\n\n```console\n$ pip freeze |grep sdbus\nsdbus==0.13.0\n```","author":{"url":"https://github.com/arkq","@type":"Person","name":"arkq"},"datePublished":"2025-03-06T10:10:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/97/python-sdbus/issues/97"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0353ed4d-febe-90d6-4af7-57c1a5687dd7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9ACE:B1B60:F6238C:1443DB9:698D774D
html-safe-nonce1b7633a9080d7884ad1a9d1447eda767b22bf8c49286e5719dd268aade519ca2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QUNFOkIxQjYwOkY2MjM4QzoxNDQzREI5OjY5OEQ3NzREIiwidmlzaXRvcl9pZCI6IjUyMTc2MDAyMjc5OTM1NDg2MjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac4fb1c42b04ec5455a9f8f2b0522055e89b78d7ec1cdf299b9f107df1f5cf94e2
hovercard-subject-tagissue:2899958003
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/python-sdbus/python-sdbus/97/issue_layout
twitter:imagehttps://opengraph.githubassets.com/051afe4c82999e96e55dc81862c142379bc7a9f056d7c8c8a28b00b33b5f4ddc/python-sdbus/python-sdbus/issues/97
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/051afe4c82999e96e55dc81862c142379bc7a9f056d7c8c8a28b00b33b5f4ddc/python-sdbus/python-sdbus/issues/97
og:image:altIf the exception occur in a method callback, the exception is not shown: import asyncio import sdbus class Test(sdbus.DbusInterfaceCommonAsync, interface_name="org.test"): @sdbus.dbus_method_async(...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamearkq
hostnamegithub.com
expected-hostnamegithub.com
Nonec0818105fa276287e9369cfdefa0a0fa7953719791ceff9b94d69623c0a4fe8a
turbo-cache-controlno-preview
go-importgithub.com/python-sdbus/python-sdbus git https://github.com/python-sdbus/python-sdbus.git
octolytics-dimension-user_id88226657
octolytics-dimension-user_loginpython-sdbus
octolytics-dimension-repository_id311269257
octolytics-dimension-repository_nwopython-sdbus/python-sdbus
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id311269257
octolytics-dimension-repository_network_root_nwopython-sdbus/python-sdbus
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
release715890fa442134f528fb422ab338c0ad55c7a025
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/issues/97#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-sdbus%2Fpython-sdbus%2Fissues%2F97
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-sdbus%2Fpython-sdbus%2Fissues%2F97
Sign up https://patch-diff.githubusercontent.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=python-sdbus%2Fpython-sdbus
Reloadhttps://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/issues/97
Reloadhttps://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/issues/97
Reloadhttps://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/issues/97
python-sdbus https://patch-diff.githubusercontent.com/python-sdbus
python-sdbushttps://patch-diff.githubusercontent.com/python-sdbus/python-sdbus
Please reload this pagehttps://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/issues/97
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-sdbus%2Fpython-sdbus
Fork 23 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-sdbus%2Fpython-sdbus
Star 105 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-sdbus%2Fpython-sdbus
Code https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus
Issues 4 https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/issues
Pull requests 1 https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/pulls
Discussions https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/discussions
Actions https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/actions
Projects 0 https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/projects
Security 0 https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/security
Insights https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/pulse
Code https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus
Issues https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/issues
Pull requests https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/pulls
Discussions https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/discussions
Actions https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/actions
Projects https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/projects
Security https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/security
Insights https://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-sdbus/python-sdbus/issues/97
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-sdbus/python-sdbus/issues/97
Async method calls do not show/print exceptionshttps://patch-diff.githubusercontent.com/python-sdbus/python-sdbus/issues/97#top
https://github.com/arkq
https://github.com/arkq
arkqhttps://github.com/arkq
on Mar 6, 2025https://github.com/python-sdbus/python-sdbus/issues/97#issue-2899958003
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.