Title: The error object doesn't have Error & traceback properties. · Issue #309 · extrabacon/python-shell · GitHub
Open Graph Title: The error object doesn't have Error & traceback properties. · Issue #309 · extrabacon/python-shell
X Title: The error object doesn't have Error & traceback properties. · Issue #309 · extrabacon/python-shell
Description: Bug I am trying to display a proper error message but the whole traceback is being printed Python code raise Exception("Error sample") Javascript code const messages = await PythonShell.run("script.py", options); console.log("File Valida...
Open Graph Description: Bug I am trying to display a proper error message but the whole traceback is being printed Python code raise Exception("Error sample") Javascript code const messages = await PythonShell.run("script...
X Description: Bug I am trying to display a proper error message but the whole traceback is being printed Python code raise Exception("Error sample") Javascript code const messages = await PythonShell.r...
Opengraph URL: https://github.com/extrabacon/python-shell/issues/309
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The error object doesn't have Error \u0026 traceback properties.","articleBody":"**Bug**\r\nI am trying to display a proper error message but the whole traceback is being printed\r\n\r\n**Python code**\r\n`raise Exception(\"Error sample\")`\r\n\r\n**Javascript code**\r\n```\r\nconst messages = await PythonShell.run(\"script.py\", options);\r\nconsole.log(\"File Validated Successfully\");\r\nconsole.log(`Results - ${messages}`);\r\n```\r\n\r\n**Expected behavior**\r\nException: Error Sample\r\n\r\n**Actual behavior**\r\nWhole traceback is printed. When I checked the error object in Javascript, it looks like this -\r\n```\r\n{\r\n executable: 'python3',\r\n options: [ '-u' ],\r\n script: 'script.py',\r\n args: [],\r\n exitCode: 1,\r\n logs: []\r\n}\r\n```\r\n\r\n\r\n**Other Information**\r\n - OS: [Sonoma 14.6.1]\r\n - Python Version [3.9.8]\r\n - Node Version [22.4.1]\r\n\r\n","author":{"url":"https://github.com/varun-liftoff","@type":"Person","name":"varun-liftoff"},"datePublished":"2024-08-22T07:24:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/309/python-shell/issues/309"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:37df5c8d-099f-0a20-b438-8760e258d3cc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A5B4:2F9F8B:2CD5407:3A493A0:69749682 |
| html-safe-nonce | a751767340ef24e9043e2006152e8f152f04fa852b438200fb823fe0584a056b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUI0OjJGOUY4QjoyQ0Q1NDA3OjNBNDkzQTA6Njk3NDk2ODIiLCJ2aXNpdG9yX2lkIjoiNjU5OTE4ODgzMjI3NDY1MDc1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 563c289c8362e8cc443c7cbb255740804a2c768edf04a6e2c3e80ef60ee16f1a |
| hovercard-subject-tag | issue:2480038978 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/extrabacon/python-shell/309/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b9749c73742d25e86ab539bc824bd51f6dd425e766b9cf255f9f8b298eed0229/extrabacon/python-shell/issues/309 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b9749c73742d25e86ab539bc824bd51f6dd425e766b9cf255f9f8b298eed0229/extrabacon/python-shell/issues/309 |
| og:image:alt | Bug I am trying to display a proper error message but the whole traceback is being printed Python code raise Exception("Error sample") Javascript code const messages = await PythonShell.run("script... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | varun-liftoff |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/extrabacon/python-shell git https://github.com/extrabacon/python-shell.git |
| octolytics-dimension-user_id | 1558613 |
| octolytics-dimension-user_login | extrabacon |
| octolytics-dimension-repository_id | 17671651 |
| octolytics-dimension-repository_nwo | extrabacon/python-shell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17671651 |
| octolytics-dimension-repository_network_root_nwo | extrabacon/python-shell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width