jupyter-datatables icon indicating copy to clipboard operation
jupyter-datatables copied to clipboard

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

Open psychemedia opened this issue 5 years ago • 15 comments

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 avatar Nov 24 '19 12:11 psychemedia

Hello! Thanks for the report.

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

CermakM avatar Nov 27 '19 22:11 CermakM

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

aoguedao avatar Nov 28 '19 14:11 aoguedao

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

CermakM avatar Nov 28 '19 15:11 CermakM

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

psychemedia avatar Nov 29 '19 01:11 psychemedia

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

CermakM avatar Nov 29 '19 07:11 CermakM

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

digitalfox avatar Dec 09 '19 22:12 digitalfox

@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.

CermakM avatar Dec 10 '19 12:12 CermakM

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...)

psychemedia avatar Dec 10 '19 16:12 psychemedia

@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.

aoguedao avatar Dec 11 '19 03:12 aoguedao

@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 :disappointed:

CermakM avatar Dec 11 '19 11:12 CermakM

The link to myBinder is fixed in: https://github.com/CermakM/jupyter-datatables/commit/59b4880f926caaecb862477f3f1c2e7bbebb4939

CermakM avatar Dec 11 '19 12:12 CermakM

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

jvivian-atreca avatar Jan 29 '20 22:01 jvivian-atreca

@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

CermakM avatar Mar 08 '20 07:03 CermakM

I also get this error. image

nscozzaro avatar Mar 26 '20 01:03 nscozzaro

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()

phaethon avatar Apr 23 '20 12:04 phaethon