Skip to content

Python3 CLI UTF/bytes encoding/decoding error #663

@casperdcl

Description

@casperdcl

tqdm should be usable as a pipe on the CLI without errors irrespective of stdin, i.e.:

cat * | tqdm >> /dev/null

should always work

  • python2 -c 'print("\xff")' | python3 -m tqdm # error
  • python2 -c 'print("\xff")' | python2 -m tqdm # works
  • * python2 -c 'print(u"\xff")' | python3 -m tqdm # error
  • * python2 -c 'print(u"\xff")' | python2 -m tqdm # error

* errors before pipe due to python2 changing encoding:
python2 -c 'print(u"\xff")' >> /dev/null also errors

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions