Extension fails in Anaconda #26
Comments
Hello @ganesh3 and thank you for testing this out! AFAIK Kaggle has a custom Jupyter kernel I didn't try to run it there neither do I know how much the kernel is actually different from the standard kernel. So this remains to be explored and potentially enhanced. Thank you for the report! |
Thanks @CermakM. I have tried this on a local installation of a Jupyter Notebook and it still gives the same error. I have copy pasted the packages that once installed creates the issue when init_datatables_mode() is called. Regards |
Hey @ganesh3 ... well, if it happens locally as well, that's interesting. Can you open up a new issue for that and reference this one, please? Also, could you possibly share console logs? (From the Web Developer tools, usually F12 on the keyboard) Cheers, |
Hi, I'm having this problem too but not on kaggle. I've tried using it on my own jupyter installed with Anaconda and on a docker container (https://hub.docker.com/r/jupyter/datascience-notebook/) |
@vjeronymo2 thanks for the input ... perhaps the problem is Anaconda, actually, as this seems that's what you two have in common. Can you share the console logs here, please? |
I ran the following commands on jupyter notebook cell instead of the linux prompt command now and it worked
Maybe a service was unavailable when I run these commands on the first time? |
Interesting, I don't know why it works now and it didn't before, but I am certainly glad it does :D ... There's no service so that certainly is not the case. Cheers, |
I got another container running to reproduce the error and it failed successfully (HA!) But I didn't get any useful log there
|
OK, I will set aside some time to check it out in the container and see what's happening in there. Might be that some component takes a bit longer to load which causes the trouble. |
Same issue here, using Anaconda, fails on |
I am having troubles reproducing the issue on Anaconda. I pulled the most recent notebook image from https://hub.docker.com/r/jupyter/datascience-notebook/tags/?page=1 and I cannot reproduce it. Everything seems to work just fine. This is may be a stupid question, but ... did you reload ("Restart & and Clear Output" and hit F5) after installing the extension? Reloading is required in order for Jupyter to register a new extension. |
@CermakM Yes, I tried reloading, restarting and clearing output, and I also restarted jupyter completely, all with the same result. I am not sure how relevant this might be, but I am running
What I did find relevant however, is that I am using the SoS kernel with the Python3 module as subkernel when this error occurs. Interestingly, I will be happy to try out other scenarios should you have any suggestions/comments. Hope this helps! |
@drivenbyentropy I am sorry, unfortunately, SoS notebooks are not my field of expertise. I have no idea how they use kernels and how they communicate with the Jupyter server. Therefore, I cannot guarantee compatibility. |
No worries, I just thought this might be a common theme among the reports as @ganesh3 is using the kaggle kernel and I am using the SoS kernel. |
@drivenbyentropy can you give me a reproducible example so that I could at least test it out? I wasn't able to reproduce this issue yet, so that might help. Cheers |
I'm having the same issue as the above. Jupyter local, using miniconda. Error starting occurring after I uninstalled and reinstalled the packages. It could be an issue between using the conda env (sys env) and the user env. I uninstalled both jupyter-require & jupyter-datatables. On reinstall, this error started occurring. |
I can reproduce this error using PyCharm + a fresh pipenv environment. Strangely, when activating the virtualenv and running the notebook outside of PyCharm, before configuring PyCharm to use the external kernel, everything works. When managing the kernel from withing PyCharm (same virtualenv specified), the above error occurs. Not sure if it is relevant to the problems experienced above. |
Could you guys share the output of |
Jupyter version 4.4.0 |
@ZachariahRosenberg the output of
At least on my machine... If it's not the case on yours, can you give me the versions of these packages? |
I tried to reproduce this issue in miniconda3. Current setup:
Done. Everything works properly surprisingly enough even on Python 3.7. |
@beanaroo I am sorry, but this is a Jupyter Notebook extension, it's not meant to be used within PyCharm environment. |
Related: CermakM/jupyter-datatables#26 Signed-off-by: Marek Cermak <macermak@redhat.com> modified: jupyter_require/core.py
@CermakM PyCharm has built-in support for Jupyter and Anaconda. Please see https://www.jetbrains.com/pycharm/promo/anaconda/ It works really well when starting the kernel externally, not so much when started by PyCharm. I presume this is a shortcoming on their end but thought it be worth mentioning in case the behaviour is related. |
@beanaroo I am sure it has, but the extension communicates with the Jupyter Notebook frontend as well (which is, of course, different in PyCharm). |
@CermakM I see the latest commit, so now the error (as you've caught) is:
Reloading doesn't remove this error - all other extensions are loaded. I see in the console
And there isn't any error. My Jupyter version just displays:
Pulling individual packages:
If helpful, I'm running Brave browser v 1.0.1, which is on Chromium 78.0.39 I've tried setting up a new conda env, but this had the same error. I also wonder if it has anything to do with dependency loading and Jupyter Paths. This is the output from
|
@ZachariahRosenberg Thanks! That is a nicely done report! :) I'll try to set up the environment accordingly when I find some spare time and see if I manage to reproduce the error. Just one more package please: What's your |
Also, if possible, would you also paste here the whole output of your web console with your |
@CermakM My pleasure - when I originally had the package working, the datatables you've designed were really useful and well done. So I'm motivated to get it back!
Here is a copy+paste of the inspector console: LogsTue, 26 Nov 2019 14:40:57 GMT[ requirejs ]DEBUG:Require config:{ And a screenshot (with most of the nested data closed, see above for a single layer further of nested info) Hope this helps! |
Glad to hear that, thanks @ZachariahRosenberg! I hope that we can make it work. |
So from the logs we actually can see that the Comms were successfully registered. Which means they really should be initialized... this is quite fishy. |
@CermakM just taking a guess here: Let's look at the call stack starting with the class Starting with
Line 197 in core.py
-->
-->
I tried simply commenting out lines 159-160 in Jupyter-Require core.py
And this seemed to fix the issue (see screenshot, woohoo). Interestingly enough, executing I'd imagine this likely has to do with a large mix of using |
@ZachariahRosenberg that is some nice piece of investigation and you actually might be onto something. Few questions here.
Maybe a hotfix for this problem could be just initializing the comms from the |
Try to check it out again with https://github.com/CermakM/jupyter-require/releases/tag/v0.5.0 released, please. |
@CermakM works. Well done! You may want to add in the documentation that when you reset Kernal, you have to refresh the page as well (as noted in the raised exception). It's also possible to factor the code to try to query/reconnect to the existing session, but a refresh isn't bad either. Also, from a previous feature request, I see the addition of Thanks! I'm looking forward to using this more and will keep in touch if more improvements come to mind (or even start a pull request!) |
@ZachariahRosenberg Thanks. All valid points! :) I'll try to update the docs soon along with the planned 0.4.0 release. I am FINALLY closing this issue, then! :) Thanks a lot for the assistance and dedication to solve this issue, your help has been invaluable. Cheers, |
Describe the bug
On executing the command init_datatables_mode() on kaggle kernel I get the error as mentioned.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should run successfully
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: