Title: Frequent KeyError: 'InvalidFromAddress' traceback messages despite working some of the time · Issue #10 · socketlabs/socketlabs-python · GitHub
Open Graph Title: Frequent KeyError: 'InvalidFromAddress' traceback messages despite working some of the time · Issue #10 · socketlabs/socketlabs-python
X Title: Frequent KeyError: 'InvalidFromAddress' traceback messages despite working some of the time · Issue #10 · socketlabs/socketlabs-python
Description: I have the following code snippet that works some of the time, but more often that not results in a traceback indicating KeyError: 'InvalidFromAddress' I am using python 3.10 def __notifySend(self, to_email: str, from_email: str) -> None...
Open Graph Description: I have the following code snippet that works some of the time, but more often that not results in a traceback indicating KeyError: 'InvalidFromAddress' I am using python 3.10 def __notifySend(self,...
X Description: I have the following code snippet that works some of the time, but more often that not results in a traceback indicating KeyError: 'InvalidFromAddress' I am using python 3.10 def __notifySe...
Opengraph URL: https://github.com/socketlabs/socketlabs-python/issues/10
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Frequent KeyError: 'InvalidFromAddress' traceback messages despite working some of the time","articleBody":"I have the following code snippet that works some of the time, but more often that not results in a traceback indicating `KeyError: 'InvalidFromAddress'`\r\n\r\nI am using python 3.10\r\n\r\n```python\r\n def __notifySend(self, to_email: str, from_email: str) -\u003e None: \r\n msg = BasicMessage()\r\n slc = SocketLabsClient(\r\n int(str(os.getenv(\"SOCKETLABS_SERVER_ID\"))),\r\n str(os.getenv(\"SOCKETLABS_API_KEY\"))\r\n )\r\n msg.subject = \"Suspected troll found!\"\r\n msg.html_body = \"\u003chtml\u003eBusted!\u003c/html\u003e\"\r\n msg.plain_text_body = \"We got 'im boys!\"\r\n msg.from_email_address = EmailAddress(from_email)\r\n msg.to_email_address.append(EmailAddress(to_email))\r\n\r\n response = slc.send(msg)\r\n print(response)\r\n return\r\n```\r\n\r\nI am not sure why this would be the case, as the method more or less follows exactly what the documentation suggests, and sometimes it works as expected. I have tested this on two separate known-good email addresses and can confirm that when the code does what it is supposed to, they appear in my inbox as expected.","author":{"url":"https://github.com/darmstrong8008","@type":"Person","name":"darmstrong8008"},"datePublished":"2024-02-23T17:58:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/10/socketlabs-python/issues/10"}
| 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:2f3541f9-7f85-88e8-64d0-8787b54f2301 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF2C:C5AE:8DE4:A5DF:697ED1C1 |
| html-safe-nonce | 5f5c17c6238b0ca28da17714f00894ab6654481aea4c6be783b6a6ae5c4d62ab |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjJDOkM1QUU6OERFNDpBNURGOjY5N0VEMUMxIiwidmlzaXRvcl9pZCI6IjU1Njc3MzI1ODQ4MDIwNzkxNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 808355356459faaeeaf7e1236ee44f36aa2f6cdee3380442b606316a4421dc03 |
| hovercard-subject-tag | issue:2151552173 |
| 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/socketlabs/socketlabs-python/10/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ec9b0ee1984399c9bf7a4806eea609a89415e1d8665c772626cc592e2aea6df0/socketlabs/socketlabs-python/issues/10 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ec9b0ee1984399c9bf7a4806eea609a89415e1d8665c772626cc592e2aea6df0/socketlabs/socketlabs-python/issues/10 |
| og:image:alt | I have the following code snippet that works some of the time, but more often that not results in a traceback indicating KeyError: 'InvalidFromAddress' I am using python 3.10 def __notifySend(self,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | darmstrong8008 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/socketlabs/socketlabs-python git https://github.com/socketlabs/socketlabs-python.git |
| octolytics-dimension-user_id | 279523 |
| octolytics-dimension-user_login | socketlabs |
| octolytics-dimension-repository_id | 152625263 |
| octolytics-dimension-repository_nwo | socketlabs/socketlabs-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 152625263 |
| octolytics-dimension-repository_network_root_nwo | socketlabs/socketlabs-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 | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width