{"action":"closed","number":332,"pull_request":{"url":"https://api.github.com/repos/tqdm/tqdm/pulls/332","id":100001922,"html_url":"https://github.com/tqdm/tqdm/pull/332","diff_url":"https://github.com/tqdm/tqdm/pull/332.diff","patch_url":"https://github.com/tqdm/tqdm/pull/332.patch","issue_url":"https://api.github.com/repos/tqdm/tqdm/issues/332","number":332,"state":"closed","locked":false,"title":"RuntimeError: Set changed size during iteration","user":{"login":"elsonidoq","id":510876,"avatar_url":"https://avatars.githubusercontent.com/u/510876?v=3","gravatar_id":"","url":"https://api.github.com/users/elsonidoq","html_url":"https://github.com/elsonidoq","followers_url":"https://api.github.com/users/elsonidoq/followers","following_url":"https://api.github.com/users/elsonidoq/following{/other_user}","gists_url":"https://api.github.com/users/elsonidoq/gists{/gist_id}","starred_url":"https://api.github.com/users/elsonidoq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elsonidoq/subscriptions","organizations_url":"https://api.github.com/users/elsonidoq/orgs","repos_url":"https://api.github.com/users/elsonidoq/repos","events_url":"https://api.github.com/users/elsonidoq/events{/privacy}","received_events_url":"https://api.github.com/users/elsonidoq/received_events","type":"User","site_admin":false},"body":"I'm not sure how to reproduce this, but from time to time I see this traceback on my logs\r\n\r\n```\r\nException in thread Thread-1:                                                                                                                  | 117/32097 [00:01<28:54, 18.44it/s]\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/threading.py\", line 551, in __bootstrap_inner\r\n    self.run()\r\n  File \"build/bdist.linux-x86_64/egg/tqdm/_tqdm.py\", line 102, in run\r\n    for instance in self.tqdm_cls._instances:\r\n  File \"/mnt/modeling_files/data/recsys/view2view-env/lib/python2.7/_weakrefset.py\", line 60, in __iter__\r\n    for itemref in self.data:\r\nRuntimeError: Set changed size during iteration\r\n```\r\n\r\nI think a very quick solution to this, is changing the line 102 from `for instance in self.tqdm_cls._instances:` to `for instance in self.tqdm_cls._instances.copy():`. \r\n\r\nI think we can assume that the `_instances` attribute will never have more than 10 elements (10 simultaneous progress bars! haha)\r\n","created_at":"2017-01-03T18:50:39Z","updated_at":"2017-01-20T01:54:25Z","closed_at":"2017-01-20T01:54:25Z","merged_at":null,"merge_commit_sha":"76ed07ef2d110b7f06376c1d0a2ed8fae35fe03c","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/tqdm/tqdm/milestones/8","html_url":"https://github.com/tqdm/tqdm/milestone/8","labels_url":"https://api.github.com/repos/tqdm/tqdm/milestones/8/labels","id":2131590,"number":8,"title":"v5.0.0","description":"Things to do before and including submodule reorganisation","creator":{"login":"casperdcl","id":10780059,"avatar_url":"https://avatars.githubusercontent.com/u/10780059?v=3","gravatar_id":"","url":"https://api.github.com/users/casperdcl","html_url":"https://github.com/casperdcl","followers_url":"https://api.github.com/users/casperdcl/followers","following_url":"https://api.github.com/users/casperdcl/following{/other_user}","gists_url":"https://api.github.com/users/casperdcl/gists{/gist_id}","starred_url":"https://api.github.com/users/casperdcl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/casperdcl/subscriptions","organizations_url":"https://api.github.com/users/casperdcl/orgs","repos_url":"https://api.github.com/users/casperdcl/repos","events_url":"https://api.github.com/users/casperdcl/events{/privacy}","received_events_url":"https://api.github.com/users/casperdcl/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":6,"state":"open","created_at":"2016-11-13T10:51:09Z","updated_at":"2017-01-20T01:54:25Z","due_on":"2017-02-28T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/tqdm/tqdm/pulls/332/commits","review_comments_url":"https://api.github.com/repos/tqdm/tqdm/pulls/332/comments","review_comment_url":"https://api.github.com/repos/tqdm/tqdm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tqdm/tqdm/issues/332/comments","statuses_url":"https://api.github.com/repos/tqdm/tqdm/statuses/416c662d36e5b28f460bdbab8c06c9bb07a07ee5","head":{"label":"elsonidoq:master","ref":"master","sha":"416c662d36e5b28f460bdbab8c06c9bb07a07ee5","user":{"login":"elsonidoq","id":510876,"avatar_url":"https://avatars.githubusercontent.com/u/510876?v=3","gravatar_id":"","url":"https://api.github.com/users/elsonidoq","html_url":"https://github.com/elsonidoq","followers_url":"https://api.github.com/users/elsonidoq/followers","following_url":"https://api.github.com/users/elsonidoq/following{/other_user}","gists_url":"https://api.github.com/users/elsonidoq/gists{/gist_id}","starred_url":"https://api.github.com/users/elsonidoq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elsonidoq/subscriptions","organizations_url":"https://api.github.com/users/elsonidoq/orgs","repos_url":"https://api.github.com/users/elsonidoq/repos","events_url":"https://api.github.com/users/elsonidoq/events{/privacy}","received_events_url":"https://api.github.com/users/elsonidoq/received_events","type":"User","site_admin":false},"repo":{"id":77943640,"name":"tqdm","full_name":"elsonidoq/tqdm","owner":{"login":"elsonidoq","id":510876,"avatar_url":"https://avatars.githubusercontent.com/u/510876?v=3","gravatar_id":"","url":"https://api.github.com/users/elsonidoq","html_url":"https://github.com/elsonidoq","followers_url":"https://api.github.com/users/elsonidoq/followers","following_url":"https://api.github.com/users/elsonidoq/following{/other_user}","gists_url":"https://api.github.com/users/elsonidoq/gists{/gist_id}","starred_url":"https://api.github.com/users/elsonidoq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elsonidoq/subscriptions","organizations_url":"https://api.github.com/users/elsonidoq/orgs","repos_url":"https://api.github.com/users/elsonidoq/repos","events_url":"https://api.github.com/users/elsonidoq/events{/privacy}","received_events_url":"https://api.github.com/users/elsonidoq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elsonidoq/tqdm","description":"A fast, extensible progress bar for Python and CLI","fork":true,"url":"https://api.github.com/repos/elsonidoq/tqdm","forks_url":"https://api.github.com/repos/elsonidoq/tqdm/forks","keys_url":"https://api.github.com/repos/elsonidoq/tqdm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elsonidoq/tqdm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elsonidoq/tqdm/teams","hooks_url":"https://api.github.com/repos/elsonidoq/tqdm/hooks","issue_events_url":"https://api.github.com/repos/elsonidoq/tqdm/issues/events{/number}","events_url":"https://api.github.com/repos/elsonidoq/tqdm/events","assignees_url":"https://api.github.com/repos/elsonidoq/tqdm/assignees{/user}","branches_url":"https://api.github.com/repos/elsonidoq/tqdm/branches{/branch}","tags_url":"https://api.github.com/repos/elsonidoq/tqdm/tags","blobs_url":"https://api.github.com/repos/elsonidoq/tqdm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elsonidoq/tqdm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elsonidoq/tqdm/git/refs{/sha}","trees_url":"https://api.github.com/repos/elsonidoq/tqdm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elsonidoq/tqdm/statuses/{sha}","languages_url":"https://api.github.com/repos/elsonidoq/tqdm/languages","stargazers_url":"https://api.github.com/repos/elsonidoq/tqdm/stargazers","contributors_url":"https://api.github.com/repos/elsonidoq/tqdm/contributors","subscribers_url":"https://api.github.com/repos/elsonidoq/tqdm/subscribers","subscription_url":"https://api.github.com/repos/elsonidoq/tqdm/subscription","commits_url":"https://api.github.com/repos/elsonidoq/tqdm/commits{/sha}","git_commits_url":"https://api.github.com/repos/elsonidoq/tqdm/git/commits{/sha}","comments_url":"https://api.github.com/repos/elsonidoq/tqdm/comments{/number}","issue_comment_url":"https://api.github.com/repos/elsonidoq/tqdm/issues/comments{/number}","contents_url":"https://api.github.com/repos/elsonidoq/tqdm/contents/{+path}","compare_url":"https://api.github.com/repos/elsonidoq/tqdm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elsonidoq/tqdm/merges","archive_url":"https://api.github.com/repos/elsonidoq/tqdm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elsonidoq/tqdm/downloads","issues_url":"https://api.github.com/repos/elsonidoq/tqdm/issues{/number}","pulls_url":"https://api.github.com/repos/elsonidoq/tqdm/pulls{/number}","milestones_url":"https://api.github.com/repos/elsonidoq/tqdm/milestones{/number}","notifications_url":"https://api.github.com/repos/elsonidoq/tqdm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elsonidoq/tqdm/labels{/name}","releases_url":"https://api.github.com/repos/elsonidoq/tqdm/releases{/id}","deployments_url":"https://api.github.com/repos/elsonidoq/tqdm/deployments","created_at":"2017-01-03T18:47:09Z","updated_at":"2017-01-03T18:47:12Z","pushed_at":"2017-01-20T01:54:25Z","git_url":"git://github.com/elsonidoq/tqdm.git","ssh_url":"git@github.com:elsonidoq/tqdm.git","clone_url":"https://github.com/elsonidoq/tqdm.git","svn_url":"https://github.com/elsonidoq/tqdm","homepage":"https://pypi.python.org/pypi/tqdm","size":2935,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tqdm:master","ref":"master","sha":"416c662d36e5b28f460bdbab8c06c9bb07a07ee5","user":{"login":"tqdm","id":12731565,"avatar_url":"https://avatars.githubusercontent.com/u/12731565?v=3","gravatar_id":"","url":"https://api.github.com/users/tqdm","html_url":"https://github.com/tqdm","followers_url":"https://api.github.com/users/tqdm/followers","following_url":"https://api.github.com/users/tqdm/following{/other_user}","gists_url":"https://api.github.com/users/tqdm/gists{/gist_id}","starred_url":"https://api.github.com/users/tqdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tqdm/subscriptions","organizations_url":"https://api.github.com/users/tqdm/orgs","repos_url":"https://api.github.com/users/tqdm/repos","events_url":"https://api.github.com/users/tqdm/events{/privacy}","received_events_url":"https://api.github.com/users/tqdm/received_events","type":"Organization","site_admin":false},"repo":{"id":36804486,"name":"tqdm","full_name":"tqdm/tqdm","owner":{"login":"tqdm","id":12731565,"avatar_url":"https://avatars.githubusercontent.com/u/12731565?v=3","gravatar_id":"","url":"https://api.github.com/users/tqdm","html_url":"https://github.com/tqdm","followers_url":"https://api.github.com/users/tqdm/followers","following_url":"https://api.github.com/users/tqdm/following{/other_user}","gists_url":"https://api.github.com/users/tqdm/gists{/gist_id}","starred_url":"https://api.github.com/users/tqdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tqdm/subscriptions","organizations_url":"https://api.github.com/users/tqdm/orgs","repos_url":"https://api.github.com/users/tqdm/repos","events_url":"https://api.github.com/users/tqdm/events{/privacy}","received_events_url":"https://api.github.com/users/tqdm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tqdm/tqdm","description":"A fast, extensible progress bar for Python and CLI","fork":false,"url":"https://api.github.com/repos/tqdm/tqdm","forks_url":"https://api.github.com/repos/tqdm/tqdm/forks","keys_url":"https://api.github.com/repos/tqdm/tqdm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tqdm/tqdm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tqdm/tqdm/teams","hooks_url":"https://api.github.com/repos/tqdm/tqdm/hooks","issue_events_url":"https://api.github.com/repos/tqdm/tqdm/issues/events{/number}","events_url":"https://api.github.com/repos/tqdm/tqdm/events","assignees_url":"https://api.github.com/repos/tqdm/tqdm/assignees{/user}","branches_url":"https://api.github.com/repos/tqdm/tqdm/branches{/branch}","tags_url":"https://api.github.com/repos/tqdm/tqdm/tags","blobs_url":"https://api.github.com/repos/tqdm/tqdm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tqdm/tqdm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tqdm/tqdm/git/refs{/sha}","trees_url":"https://api.github.com/repos/tqdm/tqdm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tqdm/tqdm/statuses/{sha}","languages_url":"https://api.github.com/repos/tqdm/tqdm/languages","stargazers_url":"https://api.github.com/repos/tqdm/tqdm/stargazers","contributors_url":"https://api.github.com/repos/tqdm/tqdm/contributors","subscribers_url":"https://api.github.com/repos/tqdm/tqdm/subscribers","subscription_url":"https://api.github.com/repos/tqdm/tqdm/subscription","commits_url":"https://api.github.com/repos/tqdm/tqdm/commits{/sha}","git_commits_url":"https://api.github.com/repos/tqdm/tqdm/git/commits{/sha}","comments_url":"https://api.github.com/repos/tqdm/tqdm/comments{/number}","issue_comment_url":"https://api.github.com/repos/tqdm/tqdm/issues/comments{/number}","contents_url":"https://api.github.com/repos/tqdm/tqdm/contents/{+path}","compare_url":"https://api.github.com/repos/tqdm/tqdm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tqdm/tqdm/merges","archive_url":"https://api.github.com/repos/tqdm/tqdm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tqdm/tqdm/downloads","issues_url":"https://api.github.com/repos/tqdm/tqdm/issues{/number}","pulls_url":"https://api.github.com/repos/tqdm/tqdm/pulls{/number}","milestones_url":"https://api.github.com/repos/tqdm/tqdm/milestones{/number}","notifications_url":"https://api.github.com/repos/tqdm/tqdm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tqdm/tqdm/labels{/name}","releases_url":"https://api.github.com/repos/tqdm/tqdm/releases{/id}","deployments_url":"https://api.github.com/repos/tqdm/tqdm/deployments","created_at":"2015-06-03T13:13:14Z","updated_at":"2017-01-19T16:56:12Z","pushed_at":"2017-01-20T01:50:35Z","git_url":"git://github.com/tqdm/tqdm.git","ssh_url":"git@github.com:tqdm/tqdm.git","clone_url":"https://github.com/tqdm/tqdm.git","svn_url":"https://github.com/tqdm/tqdm","homepage":"https://pypi.python.org/pypi/tqdm","size":2941,"stargazers_count":3431,"watchers_count":3431,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":157,"mirror_url":null,"open_issues_count":72,"forks":157,"open_issues":72,"watchers":3431,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tqdm/tqdm/pulls/332"},"html":{"href":"https://github.com/tqdm/tqdm/pull/332"},"issue":{"href":"https://api.github.com/repos/tqdm/tqdm/issues/332"},"comments":{"href":"https://api.github.com/repos/tqdm/tqdm/issues/332/comments"},"review_comments":{"href":"https://api.github.com/repos/tqdm/tqdm/pulls/332/comments"},"review_comment":{"href":"https://api.github.com/repos/tqdm/tqdm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tqdm/tqdm/pulls/332/commits"},"statuses":{"href":"https://api.github.com/repos/tqdm/tqdm/statuses/416c662d36e5b28f460bdbab8c06c9bb07a07ee5"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":3,"review_comments":0,"maintainer_can_modify":false,"commits":0,"additions":0,"deletions":0,"changed_files":0}}
{"actor":{"display_login":"casperdcl"}}