vaex icon indicating copy to clipboard operation
vaex copied to clipboard

Issue on page /tutorial_jupyter.html

Open mfouesneau opened this issue 2 years ago • 1 comments

The tutorial does not run. It crashes at the fourth cell:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[4], line 1
----> 1 data_array_widget = df.widget.data_array(axes=[Lz_axis, E_axis], selection=[None, 'default'])
      2 data_array_widget  # being the last expression in the cell, Jupyter  will 'display' the widget

File .venv/lib/python3.10/site-packages/vaex/jupyter/__init__.py:57, in DataFrameAccessorWidget.data_array(self, axes, selection, shared, display_function, **kwargs)
     52 '''Create a :func:`vaex.jupyter.model.DataArray` model and :func:`vaex.jupyter.view.DataArray` widget and links them.
     53 
     54 This is a convenience method to create the model and view, and hook them up.
     55 '''
     56 import vaex.jupyter.model
---> 57 import vaex.jupyter.view
     58 if selection is not None:
     59     selection = selection.copy()

File .venv/lib/python3.10/site-packages/vaex/jupyter/view.py:10
      7 import numpy as np
      8 from IPython.display import display
---> 10 from . import widgets as vw
     11 from . import model
     12 from .traitlets import traitlet_fixes

File .venv/lib/python3.10/site-packages/vaex/jupyter/widgets.py:499
    495     def vue_action(self, data):
    496         self.value = data['value']
--> 499 class ToolsToolbar(v.VuetifyTemplate):
    500     interact_value = traitlets.Unicode(tools_items_default[0]['value'], allow_none=True).tag(sync=True)
    501     interact_items = traitlets.Any(tools_items_default).tag(sync=True)

File .venv/lib/python3.10/site-packages/vaex/jupyter/widgets.py:517, in ToolsToolbar()
    513 @traitlets.default('template')
    514 def _template(self):
    515     return load_template('vue/tools-toolbar.vue')
--> 517 @observe('z_normalize')
    518 def _observe_normalize(self, change):
    519     self.normalize = bool(self.z_normalize)

NameError: name 'observe' is not defined

Most of subsequent cells do also report this error.

mfouesneau avatar Jul 20 '23 14:07 mfouesneau

duplicate of #2321, i resolved this error for myself with this solution.

LukeDickerson19 avatar May 01 '24 05:05 LukeDickerson19