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

dict changing size in iteration #5

Closed
jasongrout opened this issue Apr 14, 2015 · 3 comments
Closed

dict changing size in iteration #5

jasongrout opened this issue Apr 14, 2015 · 3 comments
Milestone

Comments

@jasongrout
Copy link
Member

@SylvainCorlay, it looks like this might be from some of the recent traitlet changes?

jupyter/jupyter_notebook/jupyter_notebook/widgets/widget_int.pyc in __init__(self, *pargs, **kwargs)
     35     def __init__(self, *pargs, **kwargs):
     36         """Constructor"""
---> 37         super(_BoundedInt, self).__init__(*pargs, **kwargs)
     38 
     39     def _value_validate(self, value, trait):

jupyter/jupyter_notebook/jupyter_notebook/widgets/widget_int.pyc in __init__(self, value, **kwargs)
     23         if value is not None:
     24             kwargs['value'] = value
---> 25         super(_Int, self).__init__(**kwargs)
     26 
     27 

jupyter/jupyter_notebook/jupyter_notebook/widgets/widget.pyc in __init__(self, *pargs, **kwargs)
    505 
    506     def __init__(self, *pargs, **kwargs):
--> 507         super(DOMWidget, self).__init__(*pargs, **kwargs)
    508 
    509         def _validate_border(name, old, new):

jupyter/jupyter_notebook/jupyter_notebook/widgets/widget.pyc in __init__(self, **kwargs)
    170         """Public constructor"""
    171         self._model_id = kwargs.pop('model_id', None)
--> 172         super(Widget, self).__init__(**kwargs)
    173 
    174         Widget._call_widget_constructed(self)

jupyter/traitlets/traitlets/config/configurable.pyc in __init__(self, **kwargs)
     72 
     73         # load kwarg traits, other than config
---> 74         super(Configurable, self).__init__(**kwargs)
     75 
     76         # load config

jupyter/traitlets/traitlets/traitlets.pyc in __init__(self, *args, **kw)
    582         with self.hold_trait_notifications():
    583             for key, value in iteritems(kw):
--> 584                 setattr(self, key, value)
    585 
    586     @contextlib.contextmanager

contextlib.pyc in __exit__(self, type, value, traceback)
     22         if type is None:
     23             try:
---> 24                 self.gen.next()
     25             except StopIteration:
     26                 return

jupyter/traitlets/traitlets/traitlets.pyc in hold_trait_notifications(self)
    614                 self._cross_validation_lock = True
    615                 yield
--> 616                 for name in cache:
    617                     if hasattr(self, '_%s_validate' % name):
    618                         cross_validate = getattr(self, '_%s_validate' % name)

RuntimeError: dictionary changed size during iteration
@minrk
Copy link
Member

minrk commented Apr 14, 2015

Is this fixed by #3?

@SylvainCorlay
Copy link
Member

It should be fixed with this PR yes.

@minrk minrk closed this as completed in 86850a2 Apr 14, 2015
@minrk minrk added this to the 4.0 milestone Apr 14, 2015
@minrk
Copy link
Member

minrk commented Apr 14, 2015

Perfect, thanks!

minrk added a commit that referenced this issue Apr 20, 2015
Avoid modifications in dictionary during iteration

closes #5
azjps added a commit to azjps/traitlets that referenced this issue Dec 16, 2022
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

No branches or pull requests

3 participants