widgetti / ipyvue

Jupyter widgets base for Vue libraries
MIT License
68 stars 18 forks source link

fails with ipywidgets >= 7.7.4 #72

Closed jhgoebbert closed 11 months ago

jhgoebbert commented 1 year ago

Hi,
ipyvue fails with the ipywidgets >= 7.7.4 (I tested also 7.7.5 and 8.0.6). If I switch to 7.7.3 it works.

Traceback (most recent call last):
  File "[..]lib/python3.10/site-packages/traitlets/traitlets.py", line 656, in get
    value = obj._trait_values[self.name]
KeyError: 'layout'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "[..]lib/python3.10/site-packages/ipyvue/__init__.py", line 2, in <module>
    from .Html import Html
  File "[..]lib/python3.10/site-packages/ipyvue/Html.py", line 2, in <module>
    from .VueWidget import VueWidget
  File "[..]lib/python3.10/site-packages/ipyvue/VueWidget.py", line 8, in <module>
    from .ForceLoad import force_load_instance
  File "[..]lib/python3.10/site-packages/ipyvue/ForceLoad.py", line 12, in <module>
    force_load_instance = ForceLoad()
  File "[..]lib/python3.10/site-packages/ipywidgets/widgets/widget.py", line 504, in __init__
    self.open()
  File "[..]lib/python3.10/site-packages/ipywidgets/widgets/widget.py", line 517, in open
    state, buffer_paths, buffers = _remove_buffers(self.get_state())
  File "[..]lib/python3.10/site-packages/ipywidgets/widgets/widget.py", line 615, in get_state
    value = to_json(getattr(self, k), self)
  File "[..]lib/python3.10/site-packages/traitlets/traitlets.py", line 703, in __get__
    return self.get(obj, cls)
  File "[..]lib/python3.10/site-packages/traitlets/traitlets.py", line 659, in get
    default = obj.trait_defaults(self.name)
  File "[..]lib/python3.10/site-packages/traitlets/traitlets.py", line 1872, in trait_defaults
    return self._get_trait_default_generator(names[0])(self)
  File "[..]lib/python3.10/site-packages/traitlets/traitlets.py", line 627, in default
    return self.make_dynamic_default()
  File "[..]lib/python3.10/site-packages/ipywidgets/widgets/trait_types.py", line 365, in make_dynamic_default
    return self.klass(*(self.default_args or ()),
  File "[..]lib/python3.10/site-packages/ipywidgets/widgets/widget_layout.py", line 86, in __init__
    super().__init__(**kwargs)
  File "[..]lib/python3.10/site-packages/ipywidgets/widgets/widget.py", line 504, in __init__
    self.open()
  File "[..]lib/python3.10/site-packages/ipywidgets/widgets/widget.py", line 535, in open
    self.comm = create_comm(**args)
  File "[..]lib/python3.10/site-packages/comm/__init__.py", line 27, in _create_comm
    raise NotImplementedError("Cannot ")
NotImplementedError: Cannot,
jhgoebbert commented 1 year ago

I closed it as I thought 1.9.1 has fixed this. But the reason why it worked for me was actually that I downgraded to ipywidgets 7.7.3 at the same time.

mariobuikhuizen commented 1 year ago

I can't reproduce this issue. Can you provide a minimal example and environment to reproduce this issue?

jhgoebbert commented 1 year ago

So probably the reason for the issue is related to my large/complex Python 3.10 environment and it is likely to be a problem in combination with one of the many other packages there. I will try to reduce the package ...

 hatchling 1.13.0 
 hatch_nodejs_version 0.3.1 
 ipython_genutils 0.2.0 
 ipython 8.14.0
 pickleshare 0.7.5  
 prompt_toolkit 3.0.38 
 traitlets 5.9.0 
 parso 0.8.3 
 jedi 0.18.2 
 testpath 0.6.0 
 Send2Trash 1.8.2 
 bleach 5.0.1 
 pandocfilters 1.5.0 
 pyzmq 25.0.1 
 entrypoints 0.4 
 jupyter_core 5.3.0
 fastjsonschema 2.17.1 
 nbformat 5.9.0
 mistune 2.0.5
 defusedxml 0.7.1
 async_generator 1.10 
 nest_asyncio 1.5.6 
 nbclient 0.7.4
 tinycss2 1.2.1
 nbconvert 7.4.0
 tornado 6.2
 terminado 0.17.1
 jupyter_client 8.2.0
 backcall 0.2.0
 executing 1.2.0
 asttokens 2.2.1
 pure_eval 0.2.2
 stack_data 0.6.2 
 comm 0.1.2 
 ipykernel 6.23.1 
 prometheus_client 0.17.0 
 deprecation 2.1.0 
 jupyter_packaging 0.12.3 
 jupyterlab_pygments 0.2.2 
 jupyterlab_widgets 1.1.4 
 ipywidgets 7.7.3 
 argon2-cffi-bindings 21.2.0 
 argon2-cffi 21.3.0 
 notebook 6.4.12 
 widgetsnbextension 3.6.4 
 matplotlib-inline 0.1.6 
 debugpy 1.6.7
 hatchling 1.13.0
 hatch_nodejs_version 0.3.1
 hatch_jupyter_builder 0.8.3
 pyzmq 24.0.1  # overwrite
 websocket-client 1.5.1
 traitlets 5.9.0  # overwrite
 sniffio 1.3.0
 anyio 3.6.2
 jupyter_server 2.5.0
 jupyter_server_terminals 0.4.4
 notebook_shim 0.2.3
 jupyter_core 5.3.0  # overwrite
 jupyter_client 8.2.0  # overwrite
 deprecation 2.1.0
 rfc3339_validator 0.1.4
 rfc3986_validator 0.1.1
 jupyter_events 0.6.3
 python-json-logger 2.0.7
 nbclassic 1.0.0
 jupyter_server 2.5.0
 requests 2.30.0
 jsonschema 4.17.3
 json5 0.9.11
 jupyterlab_server 2.22.1
 y_py 0.5.9
 jupyter_ydoc 0.2.4
 jupyter_server_fileid 0.9.0
 jupyter_server_ydoc 0.8.0
 aiosqlite 0.19.0
 aiofiles 22.1.0
 ypy_websocket 0.8.2
 jupyterlab 3.6.3
 aiosignal 1.3.1
 async-timeout 4.0.2
 frozenlist 1.3.3
 multidict 6.0.4
 yarl 1.9.2
 aiohttp 3.8.4
 simpervisor 0.4
 jupyter_server_proxy 4.0.0
 python-lsp-jsonrpc 1.0.0
 docstring-to-markdown 0.12
 python-lsp-server 1.7.2
 jupyter-lsp 2.1.0
 jupyterlab-lsp 4.1.0
 ipympl 0.9.3
 tornado_proxy_handlers 0.0.5
 jupyterlab_iframe 0.4.4
 branca 0.6.0
 traittypes 0.2.1
 xyzservices 2023.2.0
 ipyleaflet 0.17.2
 ipyvue 1.9.1
 ipyvuetify 1.8.10
 ipywebrtc 0.6.0
 bqplot 0.12.39
 ipydatawidgets 4.3.3
 pythreejs 2.4.2
 ipyvolume 0.6.1
 jupyter_resource_usage 0.7.2
 jupyterlab-topbar 0.6.1
 jupyterlab-controlbtn 0.5.1
 jupyterlab-system-monitor 0.8.0
 smmap 5.0.0
 gitdb 4.0.10
 GitPython 3.1.31
 jupyterlab_git 0.41.0
 jupyter_server_mathjax 0.2.6
 nbdime 3.2.1
 jupyterlab_latex 3.2.0
 jupyterlab_plugin_playground 0.4.0
 sidecar 0.5.2
 jmespath 1.0.1
 botocore 1.29.76
 aioitertools 0.11.0
 s3transfer 0.6.1
 fsspec 2023.5.0
 wrapt 1.15.0
 aiobotocore 2.5.0
 singleton-decorator 1.0.0
 s3fs 2023.5.0
 boto3 1.26.76
 jupyterlab_s3_browser c8e319b717251cc3265cfaab2fdb5221c3072238
 jupyterlab-favorites 3.1.1
 jupyterlab_recents 3.2.0
 jupyterlab-spellchecker 0.7.3
 tenacity 8.2.2
 plotly 5.14.1
 jupyter_bokeh 3.0.4
 param 1.13.0
 pyct 0.5.0
 pyviz_comms 2.2.1
 tqdm 4.65.0
 Markdown 3.4.3
 panel 0.14.4
 colorcet 3.0.1
 holoviews 1.16.0
 jupyterlab_code_formatter 1.6.1
 websockets 11.0.3
 voila 0.5.0a4
 voila-material 0.4.0
 jupyterlab-tour 3.1.4
 orjson 3.8.12
 tifffile 2023.4.12
 h5grove 0.0.14
 jupyterlab_hdf 1.3.0
 greenlet 2.0.2
 SQLAlchemy 2.0.13
 pamela 1.0.0
 oauthlib 3.2.2
 Mako 1.2.4
 alembic 1.11.0
 pyOpenSSL 22.0.0
 certipy 0.1.3
 ruamel.yaml 0.17.26
 ruamel.yaml.clib 0.2.7
 jupyter_telemetry 0.1.0
 jupyterhub 4.0.0
 ipyparallel 8.6.1
 textwrap3 0.9.2
 ansiwrap 0.8.4
 papermill 2.4.0
 watchdog 3.0.0
 execnb 0.1.5
 fastcore 1.5.29
 astunparse 1.6.3
 ghapi 1.0.3
 nbdev 2.3.12
 PyJWT 2.7.0
 pyunicore 0.15.0
 blinker 1.6.2
 Werkzeug 2.3.4
 itsdangerous 2.1.2
 Flask 2.3.2
 cachelib 0.9.0
 Flask-Caching 2.0.2
 dash 2.9.3
 dash_core_components 2.0.0
 dash_html_components 2.0.0
 dash_table 5.0.0
 dash_renderer 1.9.1
 dash-bootstrap-components 1.4.1
 dash_daq 0.5.0
 dash_player 1.1.0
 retrying 1.3.4
 ansi2html 1.8.0
 jupyter-dash 0.4.2
jhgoebbert commented 11 months ago

Probably this was a side-effect of some other package. :thinking: