Title: typer.echo() generates TypeError: a bytes-like object is required, not 'str' · Issue #884 · bpython/bpython · GitHub
Open Graph Title: typer.echo() generates TypeError: a bytes-like object is required, not 'str' · Issue #884 · bpython/bpython
X Title: typer.echo() generates TypeError: a bytes-like object is required, not 'str' · Issue #884 · bpython/bpython
Description: When using typer.echo() or typer.secho() I get... bpython version 0.21 on top of Python 3.9.1 /home/demo/.cache/pypoetry/virtualenvs/poetry-test-XzZpibJX-py3.9/bin/python >>> import typer >>> typer.echo('hello') Traceback (most recent ca...
Open Graph Description: When using typer.echo() or typer.secho() I get... bpython version 0.21 on top of Python 3.9.1 /home/demo/.cache/pypoetry/virtualenvs/poetry-test-XzZpibJX-py3.9/bin/python >>> import typer >>> typer...
X Description: When using typer.echo() or typer.secho() I get... bpython version 0.21 on top of Python 3.9.1 /home/demo/.cache/pypoetry/virtualenvs/poetry-test-XzZpibJX-py3.9/bin/python >>> import typer ...
Opengraph URL: https://github.com/bpython/bpython/issues/884
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"typer.echo() generates TypeError: a bytes-like object is required, not 'str'","articleBody":"When using [typer.echo()](https://typer.tiangolo.com/tutorial/printing/) or typer.secho() I get...\r\n\r\n```\r\nbpython version 0.21 on top of Python 3.9.1 /home/demo/.cache/pypoetry/virtualenvs/poetry-test-XzZpibJX-py3.9/bin/python\r\n\u003e\u003e\u003e import typer\r\n\u003e\u003e\u003e typer.echo('hello')\r\nTraceback (most recent call last):\r\n File \"\u003cinput\u003e\", line 1, in \u003cmodule\u003e\r\n typer.echo('hello')\r\n File \"/home/demo/.cache/pypoetry/virtualenvs/poetry-test-XzZpibJX-py3.9/lib/python3.9/site-packages/click/utils.py\", line 272, in echo\r\n file.write(message)\r\n File \"/home/demo/.cache/pypoetry/virtualenvs/poetry-test-XzZpibJX-py3.9/lib/python3.9/site-packages/bpython/curtsiesfrontend/coderunner.py\", line 218, in write\r\n self.on_write(s, *args, **kwargs)\r\n File \"/home/demo/.cache/pypoetry/virtualenvs/poetry-test-XzZpibJX-py3.9/lib/python3.9/site-packages/bpython/curtsiesfrontend/repl.py\", line 1247, in send_to_stdouterr\r\n lines = output.split(\"\\n\")\r\nTypeError: a bytes-like object is required, not 'str'\r\n```\r\n\r\nThis error does not occur with the Python REPL or ptpython.\r\n\r\nTested with Python 3.8.5 and 3.9.1\r\nTyper version: 0.3.2\r\nbpython version: 0.21\r\n\r\nA similar problem was [mentioned](https://github.com/bpython/bpython/issues/700#issuecomment-641607049) in another issue. \r\n","author":{"url":"https://github.com/PodioSpaz","@type":"Person","name":"PodioSpaz"},"datePublished":"2021-02-07T13:59:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/884/bpython/issues/884"}
| 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:9a1f3e1e-7311-2866-7e58-0efe86e626f4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9346:05A2:20EFB19:2D2C92C:69676BB7 |
| html-safe-nonce | 453a0d3deaa72f41931c78d880e6c48991f3c0ed42713c5ab5ab38e3ae2a8f78 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzQ2OjA1QTI6MjBFRkIxOToyRDJDOTJDOjY5Njc2QkI3IiwidmlzaXRvcl9pZCI6Ijg2OTc1MTA2MTgxNTY0NjA5ODMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ddc06f47460dc53a3bb0ffaf19d6655efcc40927dc1ea137f0d230db01e19b48 |
| hovercard-subject-tag | issue:802959014 |
| 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/bpython/bpython/884/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b08811c446bb8f7aa80011c5a584edea8e032555c2d6d7e5fe1974b37d4b7f5e/bpython/bpython/issues/884 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b08811c446bb8f7aa80011c5a584edea8e032555c2d6d7e5fe1974b37d4b7f5e/bpython/bpython/issues/884 |
| og:image:alt | When using typer.echo() or typer.secho() I get... bpython version 0.21 on top of Python 3.9.1 /home/demo/.cache/pypoetry/virtualenvs/poetry-test-XzZpibJX-py3.9/bin/python >>> import typer >>> typer... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | PodioSpaz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1a6a4ac66aaa8be0077b72a69fd56fb51cd11215a1e31f0365079e012987234a |
| turbo-cache-control | no-preview |
| go-import | github.com/bpython/bpython git https://github.com/bpython/bpython.git |
| octolytics-dimension-user_id | 8071396 |
| octolytics-dimension-user_login | bpython |
| octolytics-dimension-repository_id | 21508865 |
| octolytics-dimension-repository_nwo | bpython/bpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21508865 |
| octolytics-dimension-repository_network_root_nwo | bpython/bpython |
| 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 | 045909cd564d790cacd96dcb8722039dff679d63 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width