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

[BUG] Binder Jupyter Notebooks Error #372

Open
eavidan opened this issue May 3, 2021 · 6 comments
Open

[BUG] Binder Jupyter Notebooks Error #372

eavidan opened this issue May 3, 2021 · 6 comments
Assignees

Comments

@eavidan
Copy link

eavidan commented May 3, 2021

Running the binder tutorial I receive the following error

/srv/conda/envs/notebook/lib/python3.7/site-packages/IPython/core/formatters.py:918: UserWarning:
Unexpected error in rendering Lux widget and recommendations. Falling back to Pandas display.
Please report the following issue on Github: https://github.com/lux-org/lux/issues 

/srv/conda/envs/notebook/lib/python3.7/site-packages/lux/core/frame.py:628: UserWarning:Traceback (most recent call last):
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/lux/core/frame.py", line 590, in _ipython_display_
    self.maintain_recs()
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/lux/core/frame.py", line 447, in maintain_recs
    self._widget = rec_df.render_widget()
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/lux/core/frame.py", line 675, in render_widget
    import luxwidget
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/luxwidget/__init__.py", line 4, in <module>
    from .widget import LuxWidget
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/luxwidget/widget.py", line 5, in <module>
    from ._frontend import module_name, module_version
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/luxwidget/_frontend.py", line 3, in <module>
    from ._version import __version__
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/luxwidget/_version.py", line 18, in <module>
    __version__ = _fetchVersion()
  File "/srv/conda/envs/notebook/lib/python3.7/site-packages/luxwidget/_version.py", line 16, in _fetchVersion
    raise FileNotFoundError(f"Could not find package.json under dir {HERE!s}")
FileNotFoundError: Could not find package.json under dir /srv/conda/envs/notebook/lib/python3.7/site-packages/luxwidget
@dorisjlee
Copy link
Member

Hi @eavidan, Thank you for reporting this issue! I made a temporary fix to resolve this issue. For now, you could try out Lux with Binder for JupyterLab here!

@willeppy
Copy link

Hey @dorisjlee did you find out what was causing this? I'm running into a similar issue where it can't find package.json when I have made changes to luxwidget and then am trying to install in a different environment over pip.

I feel like it might have something to do with how LuxWidget is build or installed but I haven't been able to nail it down.

Was your temp fix just to manually add the package.json to wherever luxwidget is installed?

@dorisjlee
Copy link
Member

Hey @willeppy, My temporary fix was simply to add an additional folder with the package.json (luxwidget/labextension/package.json), and it seems to work for JupyterLab. Are you using JupyterLab or Jupyter Notebook when building locally?

@willeppy
Copy link

I've been testing locally with jupyter lab and it works fine. The issue is coming up when I try to install both my version of lux and luxwidget in a fresh environment and I'm getting the same FileNotFoundError: Could not find package.json error.

I'm running this to install in fresh environment.

pip install git+https://github.com/willeppy/lux.git
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install luxwidget

and the install runs but I get the error when it tries to load luxwidget in the notebook

@dorisjlee
Copy link
Member

Hey @willeppy, I just tested this in a fresh virtualenv:

pip install lux-api
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install luxwidget

and it is working in the jupyter lab. If you want to build the frontend locally based on your Git fork, I would suggest doing:

git clone git@github.com:lux-org/lux-widget.git
cd lux-widget
npm install
sh install.sh # for Jupyter Notebook
or 
sh install_lab.sh # for Jupyter Lab

Let me know if that resolves the problem that you're seeing.

@dorisjlee
Copy link
Member

dorisjlee commented Jul 9, 2021

Jupyter notebook Binder link not working. We still need to debug this.
Screen Shot 2021-07-09 at 11 06 22 AM
Screen Shot 2021-07-09 at 11 07 24 AM

@dorisjlee dorisjlee changed the title [BUG] binder notebooks error [BUG] Binder Jupyter Notebooks Error Jul 9, 2021
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

4 participants