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

404 error for /nbextensions/config/main.js #489

Closed
goerz opened this issue Feb 22, 2016 · 26 comments
Closed

404 error for /nbextensions/config/main.js #489

goerz opened this issue Feb 22, 2016 · 26 comments

Comments

@goerz
Copy link

goerz commented Feb 22, 2016

After following the install instructions in the README (git clone + setup.py install), I get a 404 error when going to /nbextensions on the notebook server

goerz@node:~/jupyter_notebooks/goerz> jupyter --version
4.0.6
goerz@node:~/jupyter_notebooks/goerz> python --version
Python 3.4.4 :: Continuum Analytics, Inc.
goerz@node:~/jupyter_notebooks/goerz> jupyter notebook --debug --port=47962 2> log

The log file from starting the notebook server as above and navigating to http://localhost:47962/nbextensions is at log.txt

The browser is showing a blank page (however, when showing the page source, there's some code there that looks like what I would expect)

@jcb91
Copy link
Member

jcb91 commented Feb 22, 2016

Hmm, that's strange. It seems from the log like you're missing the main.js file, although the server-side part of the extension seems to (maybe?) be working (giving you the source you can view, and the [D 10:56:37.098 NotebookApp] 200 GET /nbextensions (::1) 44.82ms line in the log).

@jcb91
Copy link
Member

jcb91 commented Feb 22, 2016

Could you post the output of

import os.path
from jupyter_core.paths import jupyter_path

def find_extension(ext_path):
    for base in jupyter_path():
        curr_path = os.path.join(base, 'nbextensions', ext_path)
        if os.path.exists(curr_path):
            print('found extension at {!r}'.format(curr_path))

find_extension('config/main.js')

@goerz
Copy link
Author

goerz commented Feb 22, 2016

The results of find_extension('config/main.js') was empty, but it did point me to the solution (sort of): jupyter_path() contains '/home/goerz/.local/share/jupyter', however the extensions are in /home/goerz/local/share/jupyter (.local vs local). After an rsync -av ~/local/share/jupyter/ ~/.local/share/jupyter everything works.

I'm not sure whether this is something I might have done during the installation (I don't think so). Maybe there's a typo somewhere in the setup script? If I recall correctly, I did get an error message during the installation that required me do mkdir -p ~/local/share/jupyter. Another thing that might be particular to my setup is that I use ~/local (without the dot) quite regularly for installing compiled programs and library in my home directory, and I have an environment variable $PREFIX pointing to that directory.

@jcb91
Copy link
Member

jcb91 commented Feb 22, 2016

Ok, glad you've got it working for you, at least! Looking at https://github.com/ipython-contrib/IPython-notebook-extensions/blob/master/install.py#L46-L56 it seems that the script will install to $PREFIX. From http://jupyter.readthedocs.org/en/latest/system.html#data-files, however, it seems that perhaps jupyter won't take account of $PREFIX, in jupyter_path(). Perhaps we ought not to use $PREFIX for the install?

@goerz
Copy link
Author

goerz commented Feb 22, 2016

yes, that definitely explains it! Of course, this shouldn't happen, as you point out in #492

@goerz goerz closed this as completed Feb 22, 2016
@linwoodc3
Copy link

Hello @goerz and @jcb91, would welcome your help if you can provide it. I'm getting this same error 404 GET /nbextensions/nbextensions_configurator/tree_tab/main.js. Don't know what to do.

Symptoms of my problem:

  • I cannot use notebook extensions. The buttons don't show up on my page for nbpresent and when I try to use the conda packages extension, I get an error. (screen shot below)
  • I have multiple nbextension folders; not sure if I should delete something (screen shot below)
  • I tried to completely remove my anaconda install and reinstall; didn't work
  • tried pip uninstall of jupyter and conda remove of jupyter but did not change this problem
  • jupyter_path has several different paths as an output. I'm not sure if that is a problem but maybe it is. I don't know what to delete

I placed my log file from launching jupyter notebook with debug here

Here is my output of jupyter_path:

>>> from jupyter_core.paths import jupyter_path
>>> print(jupyter_path())
['/Users/linwood/Library/Jupyter', '/Users/linwood/anaconda3/share/jupyter', '/usr/local/share/jupyter', '/usr/share/jupyter']

If this helps, here's the jupyter I'm using when I'm not in an environment:

>>> which jupyter
/Users/linwood/anaconda3/bin/jupyter

Can't use conda packages extensions
screen shot 2017-01-12 at 2 38 09 am

Multiple nbextension folders
screen shot 2017-01-12 at 2 36 54 am

No nbextension buttons; can't remove ones I don't want
screen shot 2017-01-12 at 2 46 51 am

@goerz
Copy link
Author

goerz commented Jan 12, 2017

It might just be a permissions problem. Try removing all of your jupyter configuration directories and start from scratch. It might be better to post this type of question to Stackoverflow to figure out what's going on.

@linwoodc3
Copy link

@jcb91
Copy link
Member

jcb91 commented Jan 13, 2017

Hi @linwoodc3, thanks for the detailed diagnostics! The install machanism for the configurator has changed somewhat since @goerz's initial issue here, and I can't say I'm immediately sure what the problem is, but I'll offer the thoughts which occur to me at the moment.

  1. Multiple nbextension folders

    this is to be expected, at least to some extent. One can reasonably expect an nbextensions folder to exist in each of the entries in your jupyter_path, plus a sys_prefix entry for each and every conda environment in which you've installed notebook. That much is normal, so probably not an issue.

  2. from your debug server log, it seems that you're running from your scipyML conda env, but that server extensions are not all loading as expected - I can see logs for nb_conda_kernels, but not others I would expect (see below).

  3. I see no logs the jupyter_nbextensions_configurator in your debug log output. I'd expect to see something like

    [D 16:13:51.591 NotebookApp] Loading server extension jupyter_nbextensions_configurator
    [D 16:13:51.592 NotebookApp]   Editing template path to add /Users/linwood/anaconda3/envs/scipyML/lib/site-packages/jupyter_nbextensions_configurator/templates
    [D 16:13:51.594 NotebookApp]   Editing nbextensions path to add /Users/linwood/anaconda3/envs/scipyML/lib/site-packages/jupyter_nbextensions_configurator/static
    [D 16:13:51.594 NotebookApp]   Adding new handlers
    [I 16:13:51.601 NotebookApp] Loaded server extension jupyter_nbextensions_configurator
    

    for a successful load, and to see some kind of log even for a failed load.

  4. Can't use conda packages extensions

    I also see no logs for nb_conda or nb_anacondacloud serverextensions, so they're probably not being loaded, as with point 3. I'd expect to see something like

    [I 16:13:51.847 NotebookApp] [nb_anacondacloud] enabled
    [I 16:13:51.952 NotebookApp] [nb_conda] enabled
    
  5. Your nbpresent logs look the same as mine, so not sure why that's not loading

So, all of the above, particularly numbers 3 & 4 in that list, implies to me that somehow the config file(s) which should tell the notebook server to load its serverextensions haven't got edited correctly. For conda-packaged extensions, they should be editing the sys-prefix config file, which for your current env is /Users/linwood/anaconda3/envs/scipyML/etc/jupyter/jupyter_notebook_config.json. The contents ought to look something like

{
  "version": 1,
  "NotebookApp": {
    "nbserver_extensions": {
      "nbpresent": true,
      "nb_conda": true,
      "nb_anacondacloud": true,
      "jupyter_nbextensions_configurator": true
    },
    "kernel_spec_manager_class": "nb_conda_kernels.CondaKernelSpecManager"
  }
}

(possibly with extra items, but I'd expect to see at least these).

As to why this has happened, I'm not sure, but suspect it may be related to #828, where we're seeing the post-link script (which do the config file editing) failing for reasons which so far escape me. It's interesting to note that it seems to have affected nb_conda serevrrextensions as well as ones I've packaged, though.

As a one-time fix, you should (hopefully) be able to use (from command line with correct conda env active)

jupyter serverextension enable --sys-prefix jupyter_nbextensions_configurator nb_conda nb_anacondacloud nbpresent

though of course this won't prevent it happening again in new environments, so it's only a band-aid for now. Let me know whether any of that makes sense/helps 😄

@jfbercher
Copy link
Member

From the last picture in the stackoverflow post, on the right on the toolbar, it seems that some nbextensions are loaded (nbpresent?, code_prettify?). Is that right? Could you post the javascript console log here, in order to see if the nbextensions are requested (and which) and if some are loaded?

@linwoodc3
Copy link

linwoodc3 commented Jan 14, 2017

Thanks for responding @jfbercher . As a note, I did this before I ran the fix from @jcb91.

I apologize if this is the wrong thing, but I used the "Developer Tools" console of the Chrome browser to record the javascript activity as the page reloaded. Here is the info (picture of errors below too):

2. Network(X) Basics (Student).ipynb:119 loaded custom.js
default.js:48 Default extension for cell metadata editing loaded.
rawcell.js:82 Raw Cell Format toolbar preset loaded.
slideshow.js:43 Slideshow extension for metadata editing loaded.
menubar.js:240 actions jupyter-notebook:find-and-replace does not exist, still binding it in case it will be defined later...
MenuBar.bind_events @ menubar.js:240
MenuBar @ menubar.js:55
(anonymous) @ main.js:102
execCb @ require.js?v=6da8be3…:1690
check @ require.js?v=6da8be3…:865
(anonymous) @ require.js?v=6da8be3…:1140
(anonymous) @ require.js?v=6da8be3…:131
(anonymous) @ require.js?v=6da8be3…:1190
each @ require.js?v=6da8be3…:56
emit @ require.js?v=6da8be3…:1189
check @ require.js?v=6da8be3…:940
(anonymous) @ require.js?v=6da8be3…:1140
(anonymous) @ require.js?v=6da8be3…:131
(anonymous) @ require.js?v=6da8be3…:1190
each @ require.js?v=6da8be3…:56
emit @ require.js?v=6da8be3…:1189
check @ require.js?v=6da8be3…:940
enable @ require.js?v=6da8be3…:1177
init @ require.js?v=6da8be3…:783
callGetModule @ require.js?v=6da8be3…:1204
completeLoad @ require.js?v=6da8be3…:1604
onScriptLoad @ require.js?v=6da8be3…:1711
utils.js:59 load_extensions ["nbpresent/js/nbpresent.min", "nb_conda/main", "nb_anacondacloud/main", "jupyter-js-widgets/extension"]
utils.js:36 Loading extension: nbpresent/js/nbpresent.min
utils.js:36 Loading extension: nb_anacondacloud/main
require.js?v=6da8be3…:1952 GET http://localhost:8888/nbextensions/nbpresent/js/nbpresent.deps.min.js.js 
req.load @ require.js?v=6da8be3…:1952
load @ require.js?v=6da8be3…:1679
load @ require.js?v=6da8be3…:829
fetch @ require.js?v=6da8be3…:819
check @ require.js?v=6da8be3…:851
enable @ require.js?v=6da8be3…:1177
enable @ require.js?v=6da8be3…:1550
(anonymous) @ require.js?v=6da8be3…:1162
(anonymous) @ require.js?v=6da8be3…:131
each @ require.js?v=6da8be3…:56
enable @ require.js?v=6da8be3…:1114
init @ require.js?v=6da8be3…:783
(anonymous) @ require.js?v=6da8be3…:1453
require.js?v=6da8be3…:165 Uncaught Error: Script error for "nbpresent-deps"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js?v=6da8be3…:165)
    at HTMLScriptElement.onScriptError (require.js?v=6da8be3…:1732)
makeError @ require.js?v=6da8be3…:165
onScriptError @ require.js?v=6da8be3…:1732
session.js:54 Session: kernel_created (ac540fe3-f39d-4a3d-80c5-265638fb8811)
kernel.js:453 Starting WebSockets: ws://localhost:8888/api/kernels/445b6828-66f3-4312-a79f-3c4473345579
kernel.js:100 Kernel: kernel_connected (445b6828-66f3-4312-a79f-3c4473345579)
kernel.js:100 Kernel: kernel_ready (445b6828-66f3-4312-a79f-3c4473345579)
utils.js:36 Loading extension: nb_conda/main
utils.js:36 Loading extension: jupyter-js-widgets/extension
extension.js:88 loaded widgets
manager-base.js:195 Widget backend and frontend versions are compatible

screen shot 2017-01-14 at 9 29 20 am

@linwoodc3
Copy link

@jcb91; thanks for the response! About to try your fix; first I looked for all possible files matching that name:

sudo find / -type f -name "jupyter_notebook_config.json"

and found these files:

/Users/linwood/.anaconda_backup/.jupyter/jupyter_notebook_config.json
/Users/linwood/anaconda3/envs/analysis/etc/jupyter/jupyter_notebook_config.json
/Users/linwood/anaconda3/envs/scipyML/etc/jupyter/jupyter_notebook_config.json
/Users/linwood/anaconda3/etc/jupyter/jupyter_notebook_config.json
/Users/linwood/anaconda3/pkgs/_nb_ext_conf-0.3.0-py27_0/etc/jupyter/jupyter_notebook_config.json
/Users/linwood/anaconda3/pkgs/_nb_ext_conf-0.3.0-py35_0/etc/jupyter/jupyter_notebook_config.json

Here is what each file had in it:
/Users/linwood/.anaconda_backup/.jupyter/jupyter_notebook_config.json

{
  "NotebookApp": {
    "nbserver_extensions": {
      "jupyter_nbextensions_configurator": true
    }
  }
}

/Users/linwood/anaconda3/envs/analysis/etc/jupyter/jupyter_notebook_config.json

{
  "NotebookApp": {
    "nbserver_extensions": {
      "nbpresent": true,
      "nb_conda": true,
      "nb_anacondacloud": true
    },
    "kernel_spec_manager_class": "nb_conda_kernels.CondaKernelSpecManager"
  }
}

/Users/linwood/anaconda3/envs/scipyML/etc/jupyter/jupyter_notebook_config.json

{
  "NotebookApp": {
    "nbserver_extensions": {
      "nbpresent": true,
      "nb_anacondacloud": true,
      "nb_conda": true
    },
    "kernel_spec_manager_class": "nb_conda_kernels.CondaKernelSpecManager"
  }
}

/Users/linwood/anaconda3/etc/jupyter/jupyter_notebook_config.json

{
  "NotebookApp": {
    "nbserver_extensions": {
      "nbpresent": true,
      "nb_anacondacloud": true,
      "nb_conda": true
    },
    "kernel_spec_manager_class": "nb_conda_kernels.CondaKernelSpecManager"
  }
}

/Users/linwood/anaconda3/pkgs/_nb_ext_conf-0.3.0-py27_0/etc/jupyter/jupyter_notebook_config.json

{
  "NotebookApp": {
    "nbserver_extensions": {
      "nbpresent": true,
      "nb_conda": true,
      "nb_anacondacloud": true
    },
    "kernel_spec_manager_class": "nb_conda_kernels.CondaKernelSpecManager"
  }
}

/Users/linwood/anaconda3/pkgs/_nb_ext_conf-0.3.0-py35_0/etc/jupyter/jupyter_notebook_config.json

{
  "NotebookApp": {
    "nbserver_extensions": {
      "nbpresent": true,
      "nb_anacondacloud": true,
      "nb_conda": true
    },
    "kernel_spec_manager_class": "nb_conda_kernels.CondaKernelSpecManager"
  }
}

@linwoodc3
Copy link

linwoodc3 commented Jan 14, 2017

When I tried to run your script in my base anaconda environment, I got this:

Enabling: jupyter_nbextensions_configurator
- Writing config: /Users/linwood/anaconda3/etc/jupyter
    - Validating...
Error loading server extension jupyter_nbextensions_configurator
      X is jupyter_nbextensions_configurator importable?
Enabling: nb_conda
- Writing config: /Users/linwood/anaconda3/etc/jupyter
    - Validating...
Error loading server extension nb_conda
      X is nb_conda importable?
Enabling: nb_anacondacloud
- Writing config: /Users/linwood/anaconda3/etc/jupyter
    - Validating...
Error loading server extension nb_anacondacloud
      X is nb_anacondacloud importable?
Enabling: nbpresent
- Writing config: /Users/linwood/anaconda3/etc/jupyter
    - Validating...
Error loading server extension nbpresent
      X is nbpresent importable?

In my scipyML I got this:

Enabling: jupyter_nbextensions_configurator
- Writing config: /Users/linwood/anaconda3/envs/scipyML/etc/jupyter
    - Validating...
      jupyter_nbextensions_configurator  OK
Enabling: nb_conda
- Writing config: /Users/linwood/anaconda3/envs/scipyML/etc/jupyter
    - Validating...
      nb_conda  OK
Enabling: nb_anacondacloud
- Writing config: /Users/linwood/anaconda3/envs/scipyML/etc/jupyter
    - Validating...
      nb_anacondacloud  OK
Enabling: nbpresent
- Writing config: /Users/linwood/anaconda3/envs/scipyML/etc/jupyter
    - Validating...
      nbpresent  OK

And still getting this:

404 GET /nbextensions/nbpresent/js/nbpresent.deps.min.js.js (::1) 47.11ms referer=http://localhost:8888/notebooks/tutorials/stanfordCoreNLPnPython.ipynb

@jcb91
Copy link
Member

jcb91 commented Jan 14, 2017

Ok, so from the contents of your various config files @linwoodc3, it looks like for one reason or another the jupyter_nbextensions_configurator post-link script has made changes which have made it into the /Users/linwood/.anaconda_backup config, but not into the config for any of the environments in which you actually want to use it. The jupyter_nbextensions_configurator conda package will need to be installed in the environment from which you run the notebook server (which may or may not be the same as the environment for your various kernels). If you have already installed it into the correct environment, then I suspect you may be seeing a variant of #828, in which the install happens ok, but the post-link script goes awry for some reason.

When you mention

In my scipyML I got this: [...]

did that fix the configurator (for a notebook server run from environment)?

To diagnose why this (no enable of serverextension) has happened in the first place, I recommend in each environment trying

conda uninstall --force jupyter_nbextensions_configurator
conda install -c conda-forge jupyter_nbextensions_configurator

(the --force prevents conda from removing things which depend on it, like this repo's conda packages). If you see no warnings, that should be sufficient to fix the configurator. If there are warnings, you can get more information from conda's .messages.txt file, using (from shell with environment activated)

cat "$CONDA_PREFIX/.messages.txt"

Alternatively, to skip diagnosis & just get configurator working, you should be able to run

jupyter nbextensions_configurator enable --sys-prefix

in each environment (this is what the post-link script is supposed to do).


And still getting this:

404 GET /nbextensions/nbpresent/js/nbpresent.deps.min.js.js (::1) 47.11ms referer=http://localhost:8888/notebooks/tutorials/stanfordCoreNLPnPython.ipynb

Yeah, that bit, I'm not sure about, it looks like an error with the nbpresent conda package, which I'm not
familiar with. The simplest thing to try would be again to remove & reinstall the conda package in the relevant environment:

conda uninstall --force nbpresent
conda install nbpresent

@jfbercher
Copy link
Member

Clearly, from the JS console output, we see that there is an error when loading nbpresent.
We also see that for now, no nbextension other than {nbpresent, nbconda, nb_anacondacloud} and jswidgets is loaded. Once the nbextension_configurator will be reinstalled as suggested by @jcb91 you will have to open a tab at localhost:port//nbextensions (where port is 8888 by default) and select some nbextensions to load

@linwoodc3
Copy link

linwoodc3 commented Jan 14, 2017

I treid everything above; sadly, still not getting the nbextensions on the top of my notebook.

Made another log here https://gist.github.com/linwoodc3/a41f9e7a83c75a1d858b71d9ca13c8b2.

Is there a way for me to start over completely? Delete everything?

@jcb91
Copy link
Member

jcb91 commented Jan 15, 2017

From lines 16-20 in your new log, it looks like the configurator is loading correctly.

not getting the nbextensions on the top of my notebook

I'm not exactly sure what you're expecting to see here? It certainly seems that at least some are loading correctly (as @jfbercher noted above, it looks like at least code_prettify and nb_anacondacloud load correctly, and nbpresent has at least managed to create a toolbar button, even if it fouled up elsewhere). I note also in your javascript console log (good job on providing that btw, it's helpful) picture above, the file extension for one of the nbpresent javascript files is doubled, to form nbpresent.deps.min.js.js, which seems strange.

Is there a way for me to start over completely? Delete everything?

That's certainly the most definite way of resolving the problem - delete the entire conda env (note that uninstalling the packages may not be sufficient to restore the jupyter config/data directories), then recreate it from scratch. Of course, that may not be very desirable, in which case you could try the slightly less scorched-earth approach of deleting the jupyter data & config directories, then uninstalling notebook (which will remove its dependencies also), and then reinstall it. E.g. from the environment in question, something along the lines of

rm -r "$CONDA_PREFIX/etc/jupyter" # remove sys-prefix config dir
rm -r "$CONDA_PREFIX/share/jupyter" # remove sys-prefix data dir
conda uninstall jupyter_contrib_nbextensions jupyter_nbextensions_configurator nbpresent nb_conda nb_conda_kernels nb_anacondacloud
conda install jupyter_contrib_nbextensions jupyter_nbextensions_configurator nbpresent nb_conda nb_conda_kernels nb_anacondacloud

@linwoodc3
Copy link

My apologies @jcb91 . I really appreciate you guys doing this and helping; know it's not payment involved. Love open source and made one module myself so understand. On to the issue: In regards to this:

I'm not exactly sure what you're expecting to see here? ...

I am trying to get the nbpresent button to appear in the top right corner of my normal notebook view (where I write code and do stuff), so I can hit the "play" button and edit/create a presentation. I know how to do the RISE js button, but want the nbpresent button. Right now, all I see is the anaconda cloud button.

I deleted my entire Anaconda install, reinstalled, and also made sure these directories didn't exist:

rm -r "$CONDA_PREFIX/etc/jupyter" # remove sys-prefix config dir
rm -r "$CONDA_PREFIX/share/jupyter" # remove sys-prefix data dir

Then I ran this (note I had to add -c conda-forge to it, but thanks for the instruction:

conda install -c conda-forge jupyter_contrib_nbextensions jupyter_nbextensions_configurator nbpresent nb_conda nb_conda_kernels nb_anacondacloud

Then, I started following instructions on the installing jupyter_contrib_nb_extensions page.

Did this next:

jupyter contrib nbextension install --user

The output from that command is here

Then, the first time I ran jupyter notebook, I have the output at this file.

Now I see a new configuring tab (friggin awesome!!! never saw that before...is this config added to the default conda channel??? some employers might mirror the free conda..so if it is, it's there).
screen shot 2017-01-14 at 9 23 24 pm

But, notice the blacked out extensions (the one I want the most..sheesh). When I hover over them, it says " possibly incompatible"
screen shot 2017-01-14 at 9 27 58 pm

The good news is, that when I launch my notebooks, now, I see the buttons for the enabled extensions. THe last piece, is getting this nbpresent button to work. Here is the highlighter working!

screen shot 2017-01-14 at 9 34 55 pm

I think we're almost there, but understand if you're pooped out. Any suggestions appreciated. Also hope this discussion helps someone else if they run into the problem. Trying to document every step.

@jfbercher
Copy link
Member

So, it almost work now. Nice.
I just notice that the nbextensions have been installed in /Users/linwood/Library/Jupyter/nbextensions/ ; but they are also duplicated in /Users/linwood/anaconda3/share/jupyter/nbextensions (from a previous install I suppose). I think that you can remove this last directory safely.

As far as nbpresent is concerned, it is not one of the nbextensions maintained here - so we do not know a lot on it (though it is very nice of course!). The fact that it appears as blacked out, is because it doesn't provide the yaml file used by nbconfigurator to read the extension's parameters and config.
You should have another look at the javascript console output to find what happens with nbpresent. As noticed by @jcb91, the doubling of the .js extension seems not natural. Perhaps should you check with @bollwyvl at https://github.com/Anaconda-Platform/nbpresent?

@jcb91
Copy link
Member

jcb91 commented Jan 15, 2017

My apologies @jcb91

No need, happy to help - seeing people use things you've contributed to is a reward in itself, after all 😄

Did this next:

jupyter contrib nbextension install --user

Ok, since you're using the conda packages, this wasn't actually necessary (the conda package does this step as part of its post-link script, using the --sys-prefix flag. This is the reason you have two sets of nbextensions, as @jfbercher notes above: one set from the conda install in sys-prefix, one from the second --user install you performed afterwards. You should probably get rid of one in order to avoid confusion later on, though they shouldn't actually interfere with each other right now. In contrast to @jfbercher's advice, I'd recommend that you keep the conda-provided set (the ones in /Users/linwood/anaconda3/share/jupyter/nbextension), if you always run the notebook server from the same conda environment. There is potential for confusion here again though, since if you run jupyter notebook from a different conda env (e.g. the scipyML one you had previously), the nbextensions won't appear there unless you install the jupyter_contrib_nbextensions conda package into that environment as well. This could be a reason to keep the user-directory installed set instead of the sys-prefix set, but note that every time you install or update the conda package, it'll install into sys.prefix again, so you'll have the same problem again. Does that make sense? I feel like I may not be explaining very clearly.

Now I see a new configuring tab (friggin awesome!!! never saw that before...is this config added to the default conda channel??? some employers might mirror the free conda..so if it is, it's there).

The configuring tab is provided by the jupyter_nbextensions_configurator serverextension, which gets installed as a dependency of this repo. Glad you like it 😄. I'm not sure what you mean by config being added to the default conda channel? The configurator edits jupyter config files using the notebook server's config API in order to control which nbextensions get loaded, and set options for them. I'm also not sure what you mean about employers mirroring the free conda?

But, notice the blacked out extensions (the one I want the most..sheesh). When I hover over them, it says " possibly incompatible"

As @jfbercher mentions, this is just because these are nbextensions provided not by this repo, but by some other party (e.g., as mentioned, the various nb_*-named ones are provided by other conda packages), and they don't include a yaml file to tell the configurator about them. You can still enable/disable them from the configurator interface by unchecking the checkbox at the top marked "disable configuration for nbextensions without explicit compatibility [...]". Perhaps I should make some PRs to the relevant repos to suggest adding the configurator yaml files. From your screenshots, it looks like some are already enabled, while others aren't (if I remember correctly, those with a 🚫 are currently disabled, while those with a ❗️ are currently enabled). It looks suspiciously like the nbpresent nbextension is disabled, so enabling it may fix your problem, though I'm not sure, and also not sure why it didn't get enabled by your conda install (I think mine got enabled by default?). As @jfbercher mentions, we're not the developers of nbpresent, so you might well get more useful answers on that front at Anaconda-Platform/nbpresent. Once it's enabled, if it's still not working, the javascript console is the way to go for debugging it.

@juhasch
Copy link
Member

juhasch commented Jan 15, 2017

Maybe we could talk to the Anaconda people to include a yaml file for their extensions.
It does not interfere with anything else and would help people using the nbextensions configurator.

@damianavila what do you think ?

@linwoodc3
Copy link

linwoodc3 commented Jan 15, 2017

Maybe we could talk to the Anaconda people to include a yaml file for their extensions.
It does not interfere with anything else and would help people using the nbextensions configurator.

@damianavila what do you think ?

This is a fantastic idea. The extensions that are greyed out, are the ones that are apparently officially supported (and socialized) by Continuum: https://docs.continuum.io/anaconda/jupyter-notebook-extensions

And regarding this:

I'm not sure what you mean by config being added to the default conda channel?

I mean have your configurator included in the repos here: https://repo.continuum.io/pkgs/

If you can make it so you can install the configurator without having to use the forge channel only, that would be ideal! But, of course, this is just one person's idea (me). Even so, it would open up the user base. I now understand I mistakenly thought you all were tied to the nbextensions mentioned on this page: https://docs.continuum.io/anaconda/jupyter-notebook-extensions. However, like @juhasch says, it seems like it's a natural marriage.

@jcb91
Copy link
Member

jcb91 commented Jan 15, 2017

@juhasch we might as well ask, certainly!

. I now understand I mistakenly thought you all were tied to the nbextensions mentioned

Ah, I see! Yes, there's quite a lot of confusion generally about nbextensions, who provides them, and what counts as 'official' in various contexts. Largely because it's pretty varied, complex & potentially confusing, with not that many docs available, I suppose!

the ones that are apparently officially supported (and socialized) by Continuum: https://docs.continuum.io/anaconda/jupyter-notebook-extensions

Thanks for that link, I learn from there that it's the conda package _nb_ext_conf which is responsible for activating the anaconda-provided nbextensions, so hopefully you can fix your nbpresent with a simple

conda install _nb_ext_conf 

@damianavila
Copy link
Member

@damianavila what do you think ?

It is a good idea, I think... can you open an issue in some of the repos so we don't forget about that? Thanks!

@larrycflai
Copy link

I experienced the same issue immediately after installing Jupyter_contrib_nbextensions.
Just found out that strangely after nbextensions installation,
jupyterLab was gone, and
I certain sure that it was there as I'm using it without this issue just before the install.
And after I use conda to install jupyterlab again, the issue was gone.

@siddharth-ncl-work
Copy link

In my case, it was the corporate proxy that was blocking connection to the notebook kernel (I was still able to browse the directory tree). The issue was resolved after adding the IP address of the local Jupyte server to the exception list of proxy.

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

8 participants