Title: Returing bytestring from Python to JS returns null · Issue #717 · python-eel/Eel · GitHub
Open Graph Title: Returing bytestring from Python to JS returns null · Issue #717 · python-eel/Eel
X Title: Returing bytestring from Python to JS returns null · Issue #717 · python-eel/Eel
Description: Eel version 0.16.0 Describe the bug returning a bytestring from python to Javascript just gives the value null, though decoding it to a utf-8 string works fine. To Reproduce Steps to reproduce the behavior: @eel.expose def demo_py(): ret...
Open Graph Description: Eel version 0.16.0 Describe the bug returning a bytestring from python to Javascript just gives the value null, though decoding it to a utf-8 string works fine. To Reproduce Steps to reproduce the ...
X Description: Eel version 0.16.0 Describe the bug returning a bytestring from python to Javascript just gives the value null, though decoding it to a utf-8 string works fine. To Reproduce Steps to reproduce the ...
Opengraph URL: https://github.com/python-eel/Eel/issues/717
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Returing bytestring from Python to JS returns null","articleBody":"**Eel version**\r\n0.16.0\r\n\r\n**Describe the bug**\r\nreturning a bytestring from python to Javascript just gives the value `null`, though decoding it to a utf-8 string works fine.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n```python\r\n@eel.expose\r\ndef demo_py():\r\n return b\"hello world\"\r\n```\r\n```js\r\nasync function demo_js():\r\n let str = await eel.demo_py()();\r\n console.log(str);\r\n```\r\n**Expected behavior**\r\nThe bytestring is passed to the javascript function, either as a array of numbers, or a string, or some other reasonable implementation\r\n\r\n**System Information**\r\n - OS: Linux Debian\r\n - Browser: Chromium 120.0.6099.102-rpt1 arm64\r\n - Python Distribution: Python 3.11.2\r\n\r\n**Screenshots**\r\nN/A\r\n\r\n**Additional context**\r\nAs a workaround, decoding the bytestring to a UTF8 string in python before returning behaves as expected.\r\n","author":{"url":"https://github.com/Patronics","@type":"Person","name":"Patronics"},"datePublished":"2024-01-26T04:09:02Z","url":"https://github.com/python-eel/Eel/issues/717"}
| 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:8a9928df-c481-5b36-5c7b-c1dfbee75206 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B6C0:390C3D:5363A:73A4E:6AFDFA7F |
| html-safe-nonce | 08f17d0c65a64f4b603857f68623257067256799fac79bfa62bca7ab701d5032 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkMwOjM5MEMzRDo1MzYzQTo3M0E0RTo2QUZERkE3RiIsInZpc2l0b3JfaWQiOiI3MzMzOTgxMzg5MzA3Mzc4MzAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | dfd1b4f3960808f9f55474c018f3779c0a3699a2907eed21cfd28e2a9b993a9a |
| hovercard-subject-tag | issue:2101566497 |
| 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/python-eel/Eel/717/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7379eacbfa249f199476252172130c9b08d70447c25188d6770a9f7f1a2b2d88/python-eel/Eel/issues/717 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7379eacbfa249f199476252172130c9b08d70447c25188d6770a9f7f1a2b2d88/python-eel/Eel/issues/717 |
| og:image:alt | Eel version 0.16.0 Describe the bug returning a bytestring from python to Javascript just gives the value null, though decoding it to a utf-8 string works fine. To Reproduce Steps to reproduce the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Patronics |
| hostname | github.com |
| expected-hostname | github.com |
| None | ee3343385a977757dd145b28fabf4a119780f2615a5a36c5a89f66c9b3b5616d |
| turbo-cache-control | no-preview |
| go-import | github.com/python-eel/Eel git https://github.com/python-eel/Eel.git |
| octolytics-dimension-user_id | 114726397 |
| octolytics-dimension-user_login | python-eel |
| octolytics-dimension-repository_id | 115559503 |
| octolytics-dimension-repository_nwo | python-eel/Eel |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 115559503 |
| octolytics-dimension-repository_network_root_nwo | python-eel/Eel |
| 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 | 43ae91995f6e2d5ff7a491f3de438f1f723adeaa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width