Skip to content
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

Fix RuntimeError: dictionary changed size during iteration #59

Merged
merged 1 commit into from
Apr 12, 2018

Conversation

ale-rt
Copy link
Member

@ale-rt ale-rt commented Apr 9, 2018

Fixes this error happening testing Products.CMFCore with Python3:

Error in test test_normal_purge (Products.CMFCore.exportimport.tests.test_catalog.importCatalogToolTests)
Traceback (most recent call last):
  File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/home/ale/Code/plone/plone3/src/Products.CMFCore/Products/CMFCore/exportimport/tests/test_catalog.py", line 187, in test_normal_purge
    importCatalogTool(context)
  File "/home/ale/Code/plone/plone3/src/Products.CMFCore/Products/CMFCore/exportimport/catalog.py", line 34, in importCatalogTool
    importObjects(tool, '', context)
  File "/home/ale/Code/plone/plone3/src/Products.CMFCore/src/Products.GenericSetup/Products/GenericSetup/utils.py", line 861, in importObjects
    importer.body = body
   - __traceback_info__: portal_catalog
  File "/home/ale/Code/plone/plone3/src/Products.CMFCore/src/Products.GenericSetup/Products/GenericSetup/utils.py", line 518, in _importBody
    self._importNode(dom.documentElement)
  File "/home/ale/Code/plone/plone3/src/Products.CMFCore/src/Products.GenericSetup/Products/GenericSetup/ZCatalog/exportimport.py", line 65, in _importNode
    self._purgeIndexes()
  File "/home/ale/Code/plone/plone3/src/Products.CMFCore/src/Products.GenericSetup/Products/GenericSetup/ZCatalog/exportimport.py", line 86, in _purgeIndexes
    for idx_id in self.context.indexes():
RuntimeError: dictionary changed size during iteration

@ale-rt ale-rt requested a review from davisagli April 9, 2018 22:08
@ale-rt ale-rt merged commit d280dc4 into davisagli-py3 Apr 12, 2018
@icemac icemac deleted the davisagli-py3-extension-1 branch May 22, 2018 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants