You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
typer.echo() generates TypeError: a bytes-like object is required, not 'str' #884
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 call last):
File "<input>", line 1, in <module>
typer.echo('hello')
File "/home/demo/.cache/pypoetry/virtualenvs/poetry-test-XzZpibJX-py3.9/lib/python3.9/site-packages/click/utils.py", line 272, in echo
file.write(message)
File "/home/demo/.cache/pypoetry/virtualenvs/poetry-test-XzZpibJX-py3.9/lib/python3.9/site-packages/bpython/curtsiesfrontend/coderunner.py", line 218, in write
self.on_write(s, *args, **kwargs)
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
lines = output.split("\n")
TypeError: a bytes-like object is required, not 'str'
This error does not occur with the Python REPL or ptpython.
Tested with Python 3.8.5 and 3.9.1
Typer version: 0.3.2
bpython version: 0.21
Activity
Do not abort early if nothing to output (fixes bpython#884)