python-progressbar
python-progressbar copied to clipboard
Example 20 failed with ValueError: cannot convert float NaN to integer
- Progressbar version: 2.5
- OS: OS: Arch Linux x86_64
- Kernel: 5.18.3-arch1-1
> python examples.py
Running: Example 20
Traceback (most recent call last):
File "~/sourcecode/examples.py", line 240, in <module>
for example in examples[20:]: example()
File "~/sourcecode/examples.py", line 33, in wrapped
fn()
File "~/sourcecode/examples.py", line 230, in example20
pbar.start()
File "~/.local/lib/python3.10/site-packages/progressbar/progressbar.py", line 291, in start
self.update(0)
File "~/.local/lib/python3.10/site-packages/progressbar/progressbar.py", line 262, in update
self.fd.write(self._format_line() + '\r')
File "~/.local/lib/python3.10/site-packages/progressbar/progressbar.py", line 222, in _format_line
widgets = ''.join(self._format_widgets())
File "~/.local/lib/python3.10/site-packages/progressbar/progressbar.py", line 202, in _format_widgets
widget = widgets.format_updatable(widget, self)
File "~/.local/lib/python3.10/site-packages/progressbar/widgets.py", line 39, in format_updatable
if hasattr(updatable, 'update'): return updatable.update(pbar)
File "~/.local/lib/python3.10/site-packages/progressbar/widgets.py", line 230, in update
return '%3d%%' % pbar.percentage()
ValueError: cannot convert float NaN to integer