-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: Set changed size during iteration #481
Comments
version 4.19.4 on python 3.6.3 |
Sounds like disabled locks or non-functioning threading. Are you using windows? You could disable the monitor thread by doing from tqdm import tqdm
tqdm.monitor_interval = 0 before the rest of your code |
I have the same issue on OSX |
I am on macOS as well. |
Faced with the same issue on Ubuntu (tqdm==4.19.4, Python 2.7.12). Workaround by setting monitor_interval works.
|
I'm still having this same exception occur with the current version, 4.19.5. I also can confirm that |
I have the same issue on Win10 / 3.6.3 |Anaconda custom (64-bit)| (default, Nov 8 2017, 15:10:56) [MSC v.1900 64 bit (AMD64)]:
resulting in
|
I received this error after switching to starmap from map, from the multiprocessing package. I went back to map and the error went away. Specs: Ubuntu 16.04, nvidia docker, jupyter notebook 5.2.2, python 3.6.4, anaconda, tqdm 4.19.4, tqdm_notebook Starmap code:
Map code:
|
Without digging even deeper, I think the comment 'Shallow copies.' is telling. I have encountered exceptions just like this if I iterate on a shallow copy of an interable and operate on that same iterable inside the loop using del or pop or such operations. I bet that somewhere in there is |
Also, unfortunately, the workaround found above does not work 100% of the time. I am still encountering this bug even with the workaround |
Add suggested workaround for tqdm/tqdm#481
I get it on python 3.6.4 and tqdm 4.11.2 on Ubuntu 16.04 using jupyter notebook |
This is still happening for me on tqdm (4.19.8) on macOS using jupyter notebook.
|
I am found old fix, but which is absent in current code |
that was a hack before we introduced locks, which should have eliminated the problem. It would be nice to figure out and tackle the issue rather than reintroducing the hack |
@casperdcl I think this is bad approach. This sounds for me like that you suggest do not reanimate a patient until understand what is reason of incident or don't save the somebody from fire until not understand of fire reason. A am agree that needed to figure out how to fix this correctly, but in the same time until this is not clear would be nice to make this hack. |
xD not sure whether the analogy transfers, but re-added this all the same in |
Same warning in Ubuntu 16.04.4 with tqdm4.19.9 and Python3.6.3 |
@javadnoorb if you upgrade to v4.20.0, do you still get this? |
@casperdcl I'm not sure. I can't get the upgrade with conda. But the error is not easily reproducible. I'm not getting it again with v4.19.9 |
v4.20.0 should be available: https://anaconda.org/conda-forge/tqdm |
The latest version of |
from tqdm import tqdm, TqdmSynchronisationWarning
import warnings
with warnings.catch_warnings():
warnings.simplefilter("ignore", TqdmSynchronisationWarning)
# some code here... RTM: This issue is patched in |
So I was encountering random --Update--
|
Exception in thread Thread-5: |
I'm getting the same error in Python3.6 with tqdm v4.56.0. This does not happen in Python 3.7, 3.8 neither 3.9. |
is there any proper solution to this problem instead of this workaround? |
I am still getting the error with 4.61.1 on windows. |
@Dobatymo can you post a traceback? |
I forgot which tqdm version caused this specific traceback, but it's a recent one and I think the traceback was the same for the latest version too.
So the Sorry I don't have time to fully debug this, but I get this error commonly with |
Still the same error
tqdm==4.66.1 Spawn about 66 separate progress bars, the error seem to happen randomly. |
tqdm
is throwing a set changed size during iteration exception intermittently:The text was updated successfully, but these errors were encountered: