Open ogrisel opened 1 month ago
Hi I'm trying to reproduce this on the same version but I am unable to. After installing with the extension manager and restarting JupyterLab the issue goes away for me. Does running jupyter server extension list
show that the server extension is active?
Same for me.
jupyter server extension list
shows
Config dir: C:\Users\USER\.jupyter
Config dir: C:\Users\USER\Python\envs\copilot\etc\jupyter
...
jupyter_copilot enabled
- Validating jupyter_copilot...
jupyter_copilot 0.1.3 ok
...
Hi @m-rossi Are you using this with JupyterHub or something similar? If you don't mind could you share the output of jupyter lab --debug
if you have the time? Thanks!
Quick update: The initial test I did on my company computer (as the company pays for GitHub Copilot), there I got the 404. Then I just tried my private computer and it worked immediately.
So my guess is the problem I see (and maybe also @ogrisel) is related to some proxy-issue. May @ogrisel can report back and if its a different problem I will open a separate issue.
I have no proxy on this computer (macOS laptop). I use it at home. There is no special network configuration either.
$ jupyter server extension list
Config dir: /Users/ogrisel/.jupyter
Config dir: /Users/ogrisel/miniforge3/envs/dev/etc/jupyter
jupyter_lsp enabled
- Validating jupyter_lsp...
jupyter_lsp 2.2.5 OK
jupyter_copilot enabled
- Validating jupyter_copilot...
jupyter_copilot 0.1.3 OK
jupyter_server_terminals enabled
- Validating jupyter_server_terminals...
jupyter_server_terminals 0.5.3 OK
jupyterlab enabled
- Validating jupyterlab...
jupyterlab 4.2.5 OK
jupyterlab_code_formatter enabled
- Validating jupyterlab_code_formatter...
jupyterlab_code_formatter 3.0.2 OK
notebook_shim enabled
- Validating notebook_shim...
notebook_shim OK
Config dir: /usr/local/etc/jupyter
I am using Firefox, but I just tried with chrome and got the same 404 error on the HTTP POST.
I uninstalled and reinstalled the extension either via the command line or the extension manager and restarted Jupyter lab each time and I still got the same error. I did not install JupyterHub.
same 404 error shows, even in a new env with only jupyterlab and jupyter-copilot installed
I'm really sorry that it isn't working for any of you—my best guess is that the API handlers aren't being registered for some reason. I've tried fresh installs on Mac and Linux but I still can't track down this error. I've made a new release (link) that has some more logging in the browser and terminal that may help with debugging this :+1:
I'm also encountering a 404 error, which appears to be caused by the API route not being registered properly. To solve this, I manually registered the route during JupyterLab startup, and it successfully resolved the error.
from jupyter_copilot import _load_jupyter_server_extension
from jupyter_server.serverapp import ServerApp
if __name__ == "__main__":
app = ServerApp.instance()
# Configure ServerApp to allow all IP addresses and listen on the specified port
app.ip = "0.0.0.0" # Allow access from all IP addresses
app.port = 8000 # Use port 8000
app.open_browser = False # Prevent the browser from opening automatically
app.allow_root = True
# Initialize the ServerApp instance and load extensions
app.initialize()
_load_jupyter_server_extension(app)
# Start the application
app.start()
I just installed the extension via Jupyter lab's internal extension manager, the refreshed the page (or even restarted Jupyter lab).
Then I tried to sign in via
cmd-shift-c
"Copilot: Sign in with GitHub" but nothing happened.The rest of Jupyter lab seems functional. I am running version 4.2.5.