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

Example notebook doesn't work - Can not modify FrozenDict #101

Open
yaananth opened this issue Sep 5, 2019 · 1 comment
Open

Example notebook doesn't work - Can not modify FrozenDict #101

yaananth opened this issue Sep 5, 2019 · 1 comment

Comments

@yaananth
Copy link

yaananth commented Sep 5, 2019

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
@rmorshea
Copy link
Contributor

rmorshea commented Sep 5, 2019

Thanks for reporting this.

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

2 participants