-
Notifications
You must be signed in to change notification settings - Fork 172
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
Server example doesn't work out of the box #151
Comments
Hey @DianeHu Heads up: I assume you are using JupyterLab 3 404 is quite typical when the server extension is not enabled. You can check that by running If the extension is not listed, you need to enable it If you want to develop your own server extension, I highly recommend you start it using the cookiecutter template (https://github.com/jupyterlab/extension-cookiecutter-ts) rather than copying the example. The template will ensure the naming coherence across the configuration files. |
@fcollonval I just checked and it is enabled. I actually started my server extension with the cookiecutter template and copied over code from this example, which is why I thought maybe I'd gotten some config stuff wrong and tried using the example out the box. If the server extension is enabled, are there other common problems that could cause the 404s? |
@fcollonval correction--the extension shows as enabled when I run |
It seems this is raised in https://github.com/jupyter/notebook/blob/master/notebook/serverextensions.py by
right now. I defined the function as |
I've found the problem. It seems running |
@fcollonval, I'm having the same issues as @DianeHu (their tip on
My extension throws 404 for every
Do you have any tips on how to debug between the typescript and python or the common things that can be wrong given, the server extension is valid and I've run: |
@DianeHu, My cookiecutter had the |
First of, small answer to @DianeHu
You should drop the
@DianeHu without the trace of the command you are running I won't be able to help you. Could you provide the full details: OS, Python version, JupyterLab version, command use to run the server and its trace? @jld23 you are not using the latest cookiecutter version as the entry point should be
|
@fcollonval I'm not sure if there's some other issue then but
Maybe @jld23 has a stack trace? His error is the exact same as the one I got with the unexpected JSON token etc. |
@fcollonval Thank you so much for the help! When I created a new extension cookiecutter and copied my code everything worked locally. I'm still getting the 404 inside of binder The server extension is installed, inside binder, so I'm not sure where to go next.
@DianeHu, I don't have a stack trace. If you can't reproduce, does that mean it is working as designed? |
@jld23 another engineer on my team noticed that the MANIFEST.in file for this example isn't exporting the public directory--maybe check that? |
@jld23 There is some troubles with binder and JupyterLab 3. Binder does not support the new Jupyter server used by JupyterLab 3 by default. You can support binder by adding old entry points. See that PR for an example: jupyterlab/jupyterlab-git#863 |
Thanks for taking the time to details your steps @DianeHu. I'm happy you got it working, just sad that we did not nail the reason. |
@fcollonval I think the issue might be the MANIFEST.in--if you use |
Ho yes you are right. Thank you for nailing that one. |
Problem
I'm trying to write a server extension and followed the example of the server extension. I ran into some issues so I instead tried cloning this repo and directly installing the server extension example following the instructions in the README, but I'm still seeing the same errors.
Error
I'm getting 404s on the example endpoints:
Is there any additional setup that the README is missing to get the basic example working?
The text was updated successfully, but these errors were encountered: