-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
p0-bug-critical ☢Exception rasingException rasingsubmodule-notebook 📓Much web such IDEMuch web such IDEto-fix ⌛In progressIn progress
Description
When using ncols that is str and bar_format that contains '{bar}' there is an error
>> for _ in tqdm_notebook(range(10), ncols='400px', bar_format='{bar}'):
>> sleep(0.1)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-aced8917afa9> in <module>()
1 # px ncols
----> 2 for _ in tqdm_notebook(range(10),ncols='400px', bar_format='{bar}'): #400px
3 sleep(0.1)
/usr/local/anaconda/lib/python3.6/site-packages/tqdm/__init__.py in tqdm_notebook(*args, **kwargs)
23 """See tqdm._tqdm_notebook.tqdm_notebook for full documentation"""
24 from ._tqdm_notebook import tqdm_notebook as _tqdm_notebook
---> 25 return _tqdm_notebook(*args, **kwargs)
26
27
/usr/local/anaconda/lib/python3.6/site-packages/tqdm/_tqdm_notebook.py in __init__(self, *args, **kwargs)
203 # Print initial bar state
204 if not self.disable:
--> 205 self.sp(self.__repr__()) # same as self.refresh without clearing
206
207 def __iter__(self, *args, **kwargs):
/usr/local/anaconda/lib/python3.6/site-packages/tqdm/_tqdm.py in __repr__(self, elapsed)
890 self.desc, self.ascii, self.unit,
891 self.unit_scale, 1 / self.avg_time if self.avg_time else None,
--> 892 self.bar_format, self.postfix, self.unit_divisor)
893
894 @property
/usr/local/anaconda/lib/python3.6/site-packages/tqdm/_tqdm.py in format_meter(n, total, elapsed, ncols, prefix, ascii, unit, unit_scale, rate, bar_format, postfix, unit_divisor)
363 # Formatting progress bar
364 # space available for bar's display
--> 365 N_BARS = max(1, ncols - len(l_bar) - len(r_bar)) if ncols \
366 else 10
367
TypeError: unsupported operand type(s) for -: 'str' and 'int'
>> print(tqdm.__version__, sys.version, sys.platform)
4.24.0 3.6.2 |Anaconda custom (64-bit)| (default, Sep 30 2017, 18:42:57)
[GCC 7.2.0] linux
Metadata
Metadata
Assignees
Labels
p0-bug-critical ☢Exception rasingException rasingsubmodule-notebook 📓Much web such IDEMuch web such IDEto-fix ⌛In progressIn progress