$ seq 1000 | tqdm --total 1000 --desc 'test-test' > /dev/null
Error:
Usage:
tqdm [--help | options]
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/tqdm/_main.py", line 144, in main
tqdm_args[o] = cast(v, opt_types[o])
KeyError: 'test'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/tqdm", line 11, in <module>
load_entry_point('tqdm==4.19.5', 'console_scripts', 'tqdm')()
File "/usr/lib/python3.6/site-packages/tqdm/_main.py", line 146, in main
raise TqdmKeyError(str(e))
tqdm._tqdm.TqdmKeyError: "'test'"
vs:
$ seq 100 | tqdm --total 100 --desc 'test_test' > /dev/null # works fine
(Using 4.19.5 on linux.)
hah, nice bug - my hacky dependency-free parsing to blame.
@casperdcl why not use argparse?
There's something nice about being completely dependency-free (it's not built-in for python 2.6, and would require us to basically implement argopt (or docopt) for us to support docstring-derived CLI parameters. Anyway I just realised my devel branch commit perfectly solves this issue (tqdm --desc 'foo-bar' is fine, and tqdm --desc '-foobar' isn't, which is normal for CLI programs)