Thanks to visit codestin.com
Credit goes to github.com

Skip to content

--delim always producing TypeError #739

@mbollmann

Description

@mbollmann

When I try to use the command-line interface with --delim using any other argument than a new-line (\n), I get:

Traceback (most recent call last):
  File "/home/bollmann/.virtualenv/tqdm-test/bin/tqdm", line 10, in <module>
    sys.exit(main())
  File "/home/bollmann/.virtualenv/tqdm-test/lib/python3.7/site-packages/tqdm/_main.py", line 223, in main
    posix_pipe(stdin, stdout, delim, buf_size, t.update)
  File "/home/bollmann/.virtualenv/tqdm-test/lib/python3.7/site-packages/tqdm/_main.py", line 78, in posix_pipe
    i = tmp.index(delim)
TypeError: argument should be integer or bytes-like object, not 'str'

Tried with --delim '\0', --delim ,, --delim a, ...

>>> print(tqdm.__version__)
4.31.1
>>> print(sys.version)
3.7.3 (default, Mar 27 2019, 13:41:07) 
[GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]
>>> print(sys.platform)
linux

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions