Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

typer.echo() generates TypeError: a bytes-like object is required, not 'str' #884

Closed
Labels
Milestone
@PodioSpaz

Description

@PodioSpaz

When usingtyper.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 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

A similar problem wasmentioned in another issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp