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

FrozenDict breaks Exploring Elements notebook #111

Open
rgbkrk opened this issue Mar 25, 2023 · 0 comments
Open

FrozenDict breaks Exploring Elements notebook #111

rgbkrk opened this issue Mar 25, 2023 · 0 comments

Comments

@rgbkrk
Copy link
Member

rgbkrk commented Mar 25, 2023

The following code breaks in the example notebook titled "Exploring Elements"

attrs = vid.attributes.copy()
attrs['controls'] = False
attrs['autoplay'] = False
hand.update(video(vid.children, **attrs))
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[6], line 1
----> 1 attrs = vid.attributes.copy()
      2 attrs['controls'] = False
      3 attrs['autoplay'] = False

File ~/code/src/github.com/nteract/vdom/vdom/frozendict.py:28, in FrozenDict.__setitem__(self, *args, **kwargs)
     27 def __setitem__(self, *args, **kwargs):
---> 28     return self.__readonly__(super(FrozenDict, self).__setitem__, *args, **kwargs)

File ~/code/src/github.com/nteract/vdom/vdom/frozendict.py:23, in FrozenDict.__readonly__(self, func, *args, **kwargs)
     21 def __readonly__(self, func, *args, **kwargs):
     22     if self.frozen:
---> 23         raise ValueError("Can not modify FrozenDict")
     24     else:
     25         return func(*args, **kwargs)

ValueError: Can not modify FrozenDict
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

1 participant