报错:
最小示例代码:
xxx@lthpc:~/dataset/tubcrowd$ python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import progressbar
>>> pb = progressbar.ProgressBar()
>>> pb.start(max_value=1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: start() got an unexpected keyword argument 'max_value'
# 根据网上的修改成maxval,还是报错:
>>> pb.start(maxval=1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: start() got an unexpected keyword argument 'maxval'
>>> progressbar.__version__
'2.5'
原因:progressbar版本不对,比如我是用了progressbar 2.5,更进一步的原因还未细究。
解决:卸载原来