Title: UnicodeDecodeError when using cp-1252 file enconding · Issue #2612 · getsentry/sentry-python · GitHub
Open Graph Title: UnicodeDecodeError when using cp-1252 file enconding · Issue #2612 · getsentry/sentry-python
X Title: UnicodeDecodeError when using cp-1252 file enconding · Issue #2612 · getsentry/sentry-python
Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.39.1 Steps to Reproduce When I run the following script # -*- coding: cp1252 -*- import sentry_sdk sentry_sdk.init(dsn=SENTRY_DSN) raise RuntimeError("Ä") I do not get any Issues r...
Open Graph Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.39.1 Steps to Reproduce When I run the following script # -*- coding: cp1252 -*- import sentry_sdk sentry_sdk.init(dsn=SENTRY_DSN) raise Run...
X Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.39.1 Steps to Reproduce When I run the following script # -*- coding: cp1252 -*- import sentry_sdk sentry_sdk.init(dsn=SENTRY_DSN) raise Run...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/2612
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"UnicodeDecodeError when using cp-1252 file enconding","articleBody":"### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Version\n\n1.39.1\n\n### Steps to Reproduce\n\nWhen I run the following script\r\n```python\r\n# -*- coding: cp1252 -*-\r\nimport sentry_sdk\r\nsentry_sdk.init(dsn=SENTRY_DSN)\r\nraise RuntimeError(\"Ä\")\r\n```\r\nI do not get any Issues reported\r\n\r\nI poked around a bit and found out it is because of [this line](https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/utils.py#L1129)\r\n```python\r\nlength = len(value.encode(\"utf-8\"))\r\n```\r\na `UnicodeDecodeError` gets raised here.\r\n\r\n\r\nI am using Python **2.7**\n\n### Expected Result\n\nThe `RuntimeError` appears as Issue in the web console.\n\n### Actual Result\n\nNo Issue appears","author":{"url":"https://github.com/stefan-hoelzl","@type":"Person","name":"stefan-hoelzl"},"datePublished":"2023-12-19T16:17:56Z","url":"https://github.com/getsentry/sentry-python/issues/2612"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:bdb78d64-c15d-5695-7333-1fa0240a7cdd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D220:EA06E:26AF58:3309C1:6B00BFF6 |
| html-safe-nonce | 3a92470a64dacb6239e1a15dc2753f9512bb274386c48e37cbfc828db77f869b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjIwOkVBMDZFOjI2QUY1ODozMzA5QzE6NkIwMEJGRjYiLCJ2aXNpdG9yX2lkIjoiNDkyMjgyNTM3ODI2OTAyMDE1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e79d7adb59265a02d09510954a1062c1eb9bb7fb3097b6f056baf61dccb4290d |
| hovercard-subject-tag | issue:2048993890 |
| 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/getsentry/sentry-python/2612/issue_layout |
| twitter:image | https://opengraph.githubassets.com/65c384199fb233845fbea4ad6f0ebdaad510ef5e047d58858f0c036a81b3629b/getsentry/sentry-python/issues/2612 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/65c384199fb233845fbea4ad6f0ebdaad510ef5e047d58858f0c036a81b3629b/getsentry/sentry-python/issues/2612 |
| og:image:alt | How do you use Sentry? Sentry Saas (sentry.io) Version 1.39.1 Steps to Reproduce When I run the following script # -*- coding: cp1252 -*- import sentry_sdk sentry_sdk.init(dsn=SENTRY_DSN) raise Run... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | stefan-hoelzl |
| hostname | github.com |
| expected-hostname | github.com |
| None | 93edd3bebc4afb7ce711ee74cb5d2a95927850b082a4d43e212222389cb1c415 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| 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 | 1fee81a280ea86312b69448e261b418189bfd5b5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width