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

Issue on page /tutorial_jupyter.html #2370

Open
vbrunelle opened this issue May 13, 2023 · 1 comment
Open

Issue on page /tutorial_jupyter.html #2370

vbrunelle opened this issue May 13, 2023 · 1 comment

Comments

@vbrunelle
Copy link

vbrunelle commented May 13, 2023

Hi, I am new with vaex. But I am wondering if am I the only one here that tried using the .ipynb downloadable file from the webpage at https://vaex.io/docs/tutorial_jupyter.html and getting an error while re-running the file exactly as it is, line by line, in a local jupyter notebook?

Here is the first jupyter code cell that returns an error:

data_array_widget = df.widget.data_array(axes=[Lz_axis, E_axis], selection=[None, 'default'])
data_array_widget  # being the last expression in the cell, Jupyter  will 'display' the widget

which returns me this error:

---------------------------------------------------------------------------
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 c:\users\myuser\appdata\local\programs\python\python39\lib\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 c:\users\myuser\appdata\local\programs\python\python39\lib\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 c:\users\myuser\appdata\local\programs\python\python39\lib\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 c:\users\myuser\appdata\local\programs\python\python39\lib\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

I am on Windows 10, Python is 3.9 and jupyter is 6.5.4. Vaex is 4.16.0. Anything I am missing?

@LukeDickerson19
Copy link

duplicate of #2321, i resolved this error for myself with this solution. I'm also using Vaex 4.16.0

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