vdom icon indicating copy to clipboard operation
vdom copied to clipboard

Example notebook doesn't work - Can not modify FrozenDict

Open yaananth opened this issue 6 years ago • 1 comments

Running this: https://github.com/nteract/vdom/blob/10a0f950730efab44574802647e15c1edb05758f/example-notebooks/exploring-elements.ipynb

# Change the value directly from Python
inp.attributes['value'] = "#DD55FF"
# Then update the version in your notebook
hand.update(inp)
ValueError                                Traceback (most recent call last)
<ipython-input-20-a059a19c58d7> in <module>
      1 # Change the value directly from Python
----> 2 inp.attributes['value'] = "#DD55FF"
      3 # Then update the version in your notebook
      4 hand.update(inp)

~\AppData\Local\Programs\Python\Python37\lib\site-packages\vdom\frozendict.py in __setitem__(self, *args, **kwargs)
     24 
     25     def __setitem__(self, *args, **kwargs):
---> 26         return self.__readonly__(super(FrozenDict, self).__setitem__, *args, **kwargs)
     27 
     28     def __delitem__(self, *args, **kwargs):

~\AppData\Local\Programs\Python\Python37\lib\site-packages\vdom\frozendict.py in __readonly__(self, func, *args, **kwargs)
     19     def __readonly__(self, func, *args, **kwargs):
     20         if self.frozen:
---> 21             raise ValueError("Can not modify FrozenDict")
     22         else:
     23             return func(*args, **kwargs)

ValueError: Can not modify FrozenDict

yaananth avatar Sep 05 '19 15:09 yaananth

Thanks for reporting this.

rmorshea avatar Sep 05 '19 16:09 rmorshea