Skip to content

click does not work in windows console #744

@jrxpert

Description

@jrxpert

Hi, I tried using your library but when I tried running under windows I got the following error:

Traceback (most recent call last):
File "test.py", line 12, in <module>
click.echo('Continue? [yn] ', nl=False)
File "xxx\Lib\site-packages\click\utils.py", line 217, in echo
file = _default_text_stdout()
File "xxx\Lib\site-packages\click\_compat.py", line 621, in func
rv = wrapper_func()
File "xxx\Lib\site-packages\click\_compat.py", line 385, in get_text_stdout
rv = _get_windows_console_stream(sys.stdout, encoding, errors)
File "xxx\Lib\site-packages\click\_winconsole.py", line 264, in _get_windows_console_stream
f = getattr(f, 'buffer')
AttributeError: 'TextTranscodingWrapper' object has no attribute 'buffer'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions