python-progressbar icon indicating copy to clipboard operation
python-progressbar copied to clipboard

Names with % break it

Open kittenswolf opened this issue 5 years ago • 1 comments

>>> x = Bar("%", max=100)
>>> x.next()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/kittenswolf/.local/lib/python3.6/site-packages/progress/__init__.py", line 120, in next
    self.update()
  File "/home/kittenswolf/.local/lib/python3.6/site-packages/progress/bar.py", line 36, in update
    message = self.message % self
ValueError: incomplete format```

kittenswolf avatar Mar 19 '20 18:03 kittenswolf

Yeah, maybe we should escape the input. A workaround is using "%%" for now

NiltonVolpato avatar Mar 19 '20 19:03 NiltonVolpato