我有一个python脚本,我收到以下错误:

时间:2017-11-07 15:15:45

标签: python-3.x

# pip install tqdm
from tqdm import tqdm_notebook

# works on any iterable, including cursors. 
# for iterables with len(), no need to specify 'total'.
for rec in tqdm_notebook(positions_collection.find(),total=positions_collection.count(),desc="Processing records"):
    len(rec.keys())

NameError                                 Traceback (most recent call last)
<ipython-input-1-e3f8d3beb57d> in <module>()
      4 # works on any iterable, including cursors.
      5 # for iterables with len(), no need to specify 'total'.
----> 6 for rec in tqdm_notebook(positions_collection.find(),total=positions_collection.count(),desc="Processing records"):
      7    len(rec.keys())

NameError: name 'positions_collection' is not defined

0 个答案:

没有答案