当使用tqdm来使用大量grequest时,我遇到了错误。
我正在使用的代码是
(
grequests.get(u, proxies=proxy, session=session, headers=headers, timeout=timeout)
for u in tqdm(urls, desc="Current check_in progress", miniters=1, mininterval=1)
)
,错误是
File /home/ubuntu/.local/lib/python3.7/site-packages/tqdm/_tqdm.py line 943 in __init__ args locals
self.display()
File /home/ubuntu/.local/lib/python3.7/site-packages/tqdm/_tqdm.py line 1323 in display args locals
self.sp(self.__repr__() if msg is None else msg)
File /home/ubuntu/.local/lib/python3.7/site-packages/tqdm/_tqdm.py line 250 in print_status args locals
fp_write('\r' + s + (' ' * max(last_len[0] - len_s, 0)))
File /home/ubuntu/.local/lib/python3.7/site-packages/tqdm/_tqdm.py line 244 in fp_write args locals
fp_flush()