[Solved] python tqdm raise RuntimeError(“cannot join current thread“) RuntimeError: cannot join current thr

The following error occurred when using tqdm today:

Exception ignored in: <function tqdm.__del__ at 0x7f78f8445320>
Traceback (most recent call last):
  File "/root/anaconda3/lib/python3.7/site-packages/tqdm/_tqdm.py", line 931, in __del__
    self.close()
  File "/root/anaconda3/lib/python3.7/site-packages/tqdm/_tqdm.py", line 1133, in close
    self._decr_instances(self)
  File "/root/anaconda3/lib/python3.7/site-packages/tqdm/_tqdm.py", line 496, in _decr_instances
    cls.monitor.exit()
  File "/root/anaconda3/lib/python3.7/site-packages/tqdm/_monitor.py", line 52, in exit
    self.join()
  File "/root/anaconda3/lib/python3.7/threading.py", line 1041, in join
    raise RuntimeError("cannot join current thread")
RuntimeError: cannot join current thread

I didn’t expect tqdm to have a bug

Solution:

pip install tqdm --upgrade

Read More: