Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Error on init_datatables_mode() - Comms haven't been initialized properly #30

Open
psychemedia opened this issue Nov 24, 2019 · 15 comments
Assignees
Labels
awaits approval A fix has been proposed and awaits approval bug Something isn't working help wanted Extra attention is needed

Comments

@psychemedia
Copy link

Trying an install from pip and direct from the repo, I get an error trying to iniitialise the package as per the docs:

from jupyter_datatables import init_datatables_mode

init_datatables_mode()

---------------------------------------------------------------------------
CommError                                 Traceback (most recent call last)
<ipython-input-1-4bdde0100650> in <module>
      5 from jupyter_datatables import init_datatables_mode
      6 
----> 7 init_datatables_mode()

/usr/local/lib/python3.7/site-packages/jupyter_datatables/__init__.py in init_datatables_mode(options, classes)
     94     extensions = config.defaults.extensions
     95 
---> 96     require("d3", "https://d3js.org/d3.v5.min")
     97     require("d3-array", "https://d3js.org/d3-array.v2.min")
     98 

/usr/local/lib/python3.7/site-packages/jupyter_require/core.py in __call__(self, library, path, *args, **kwargs)
    111         :param path: str, path (url) to the library without .js suffix
    112         """
--> 113         self.config({library: path}, shim=kwargs.pop('shim', {}))
    114 
    115     @property

/usr/local/lib/python3.7/site-packages/jupyter_require/core.py in config(self, paths, shim)
    158         """
    159         if not require._is_initialized:
--> 160             raise CommError("Comms haven't been initialized properly.")
    161 
    162         self.__LIBS.update(paths)

CommError: Comms haven't been initialized properly.. HINT: Try reloading <F5> the window.
@psychemedia psychemedia added the bug Something isn't working label Nov 24, 2019
@CermakM
Copy link
Owner

CermakM commented Nov 27, 2019

Hello! Thanks for the report.

This should be fixed now by https://github.com/CermakM/jupyter-require/releases/tag/v0.5.0. Please check.

@aoguedao
Copy link

I have the same issue :c I have installed
jupyter-datatables==0.3.9
jupyter-require==0.5.0
jupyterlab==1.2.3
python 3.7

@CermakM
Copy link
Owner

CermakM commented Nov 28, 2019

Could I ask any of you to try this out with python 3.6 if the issue persists please?

@psychemedia
Copy link
Author

I still get the same issue on py3.7 too; no py3.6 envt to hand to try that right now...

@CermakM
Copy link
Owner

CermakM commented Nov 29, 2019

Please, provide browser console logs and jupyter --version output, if possible.

@digitalfox
Copy link

hello
Same issue here. The error only happens with jupyterlab. With plain jupyter-notebook it works as expected.

@CermakM
Copy link
Owner

CermakM commented Dec 10, 2019

@digitalfox Yes, correct. Thanks for the confirmation.

This notebook extension is not compatible with JupyterLab, I am sorry for the inconvenience.

@psychemedia
@aLoNsolml
do you guys also use JupyterLab?

EDIT: There is already an existing issue #7 to add JupyterLab support.

@psychemedia
Copy link
Author

My issue was in notebooks...

By the by, I note that in your README, the Binder button points to nbviewer, not a MyBinder link (I was just going to give the demo notebooks a quick test in Binder...)

@aoguedao
Copy link

@digitalfox Yes, correct. Thanks for the confirmation.

This notebook extension is not compatible with JupyterLab, I am sorry for the inconvenience.

@psychemedia
@aLoNsolml
do you guys also use JupyterLab?

EDIT: There is already an existing issue #7 to add JupyterLab support.

Yeah! I have been using jupyter lab.

@CermakM
Copy link
Owner

CermakM commented Dec 11, 2019

@psychemedia Good point, thank you, I'll update the binder link!

I think there might be an issue with re-opening notebooks with saved outputs. Either that or Python 3.7 I suppose 😞

@CermakM
Copy link
Owner

CermakM commented Dec 11, 2019

The link to myBinder is fixed in: 59b4880

@jvivian-atreca
Copy link

Hi Marek, thank you the beautiful tool.

I am also running into this issue, but only sometimes and only with some notebooks which is particularly puzzling. I have a very large notebook (A) and a freshly created one (B). If I open B and run the init

from jupyter_datatables import init_datatables_mode
init_datatables_mode()

then it will provide me the comm error, which refreshing the page fixes. For the large notebook A, refreshing the page (which takes up to 15-30s), does not fix the issue and I encounter the comm error. Notebook A was also created before I installed jupyter-datatables, but I'm assuming that shouldn't matter.

Versions

jupyter core     : 4.6.1
jupyter-notebook : 5.7.8
qtconsole        : 4.4.3
ipython          : 7.4.0
ipykernel        : 5.1.0
jupyter client   : 5.3.4
jupyter lab      : 1.2.5
nbconvert        : 5.4.1
ipywidgets       : 7.5.1
nbformat         : 4.4.0
traitlets        : 4.3.2
jupyter-datatables                 0.3.9
jupyter-require                    0.6.1
Python 3.7.3

@CermakM CermakM added the help wanted Extra attention is needed label Mar 8, 2020
@CermakM
Copy link
Owner

CermakM commented Mar 8, 2020

@jvivian-atreca This is a super puzzling error and it's an annoying one. Feel free to investigate, I'd be really glad if somebody helped me with this one as I've been quite short on time lately.

Cheers,
M

@nscozzaro
Copy link

I also get this error.
image

@phaethon
Copy link

I, also, got the same issue on Centos 8, python 3.6. Workaround for this step was:

%load_ext jupyter_require
%requirejs d3 https://d3js.org/d3.v5.min

before init_datatables_mode()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaits approval A fix has been proposed and awaits approval bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants