jupyter-scheduler: When scheduler server extension not installed, error appears in HTML

Description

I cant create a schedule in my notebook. When I click the “create” schedule button it shows an error look like this: image

Error message I get:

<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>Jupyter Server</title> <link id="favicon" rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico?v=50afa725b5de8b00030139d09b38620224d4e7dba47c07ef0e86d4643f30c9bfe6bb7e1a4a1c561aa32834480909a4b6fe7cd1e17f7159330b6b5914bf45a880"> <link rel="stylesheet" href="/static/style/bootstrap.min.css?v=0e8a7fbd6de23ad6b27ab95802a0a0915af6693af612bc304d83af445529ce5d95842309ca3405d10f538d45c8a3a261b8cff78b4bd512dd9effb4109a71d0ab" /> <link rel="stylesheet" href="/static/style/bootstrap-theme.min.css?v=8b2f045cb5b4d5ad346f6e816aa2566829a4f5f2783ec31d80d46a57de8ac0c3d21fe6e53bcd8e1f38ac17fcd06d12088bc9b43e23b5d1da52d10c6b717b22b3" /> <link rel="stylesheet" href="/static/style/index.css?v=30372e3246a801d662cf9e3f9dd656fa192eebde9054a2282449fe43919de9f0ee9b745d7eb49d3b0a5e56357912cc7d776390eddcab9dac85b77bdb17b4bdae" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style type="text/css"> /* disable initial hide */ div#header, div#site { display: block; } </style> </head> <body class="" data-jupyter-api-token="6a23d167d4117a7388d0d7f60cdedc819e905d0353d0f3cc" dir="ltr"> <noscript> <div id='noscript'> Jupyter Server requires JavaScript.<br> Please enable it to proceed. </div> </noscript> <div id="header" role="navigation" aria-label="Top Menu"> <div id="header-container" class="container"> <div id="jupyter_server" class="nav navbar-brand"><a href="/lab?token=6a23d167d4117a7388d0d7f60cdedc819e905d0353d0f3cc" title='dashboard'> <img src='/static/logo/logo.png?v=a2a176ee3cee251ffddf5fa21fe8e43727a9e5f87a06f9c91ad7b776d9e9d3d5e0159c16cc188a3965e00375fb4bc336c16067c688f5040c0c2d4bfdb852a9e4' alt='Jupyter Server' /> </a></div> </div> <div class="header-bar"></div> </div> <div id="site"> <div class="error"> <h1>404 : Not Found</h1> <p>You are requesting a page that does not exist!</p> </div> </div> <script type='text/javascript'> function _remove_token_from_url() { if (window.location.search.length <= 1) { return; } var search_parameters = window.location.search.slice(1).split('&'); for (var i = 0; i < search_parameters.length; i++) { if (search_parameters[i].split('=')[0] === 'token') { // remote token from search parameters search_parameters.splice(i, 1); var new_search = ''; if (search_parameters.length) { new_search = '?' + search_parameters.join('&'); } var new_url = window.location.origin + window.location.pathname + new_search + window.location.hash; window.history.replaceState({}, "", new_url); return; } } } _remove_token_from_url(); </script> </body> </html>

Reproduce

  1. Click ‘Create Notebook Job’
  2. Click ‘Create’

Expected behavior

Context

  • Operating System and version: ubuntu 22.04
  • Browser and version: chrome
  • Jupyter Server version: 3.5
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (2 by maintainers)

Most upvoted comments

I have a similar problem. Only difference: error message is not as detailed. It only shows: “Unexpected error occurred during creation of job.” in the red error box instead of the full message as reported by @whoisltd

  • Operating System and version: Ubuntu22.04
  • Browser: Firefox
>> jupyter --version
Selected Jupyter core packages...
IPython          : 8.7.0
ipykernel        : 6.19.2
ipywidgets       : 8.0.3
jupyter_client   : 7.4.8
jupyter_core     : 5.1.0
jupyter_server   : 2.0.1
jupyterlab       : 3.5.1
nbclient         : 0.7.2
nbconvert        : 7.2.6
nbformat         : 5.7.0
notebook         : 6.5.2
qtconsole        : not installed
traitlets        : 5.7.1

I installed jupyter_scheduler with pip:

pip install jupyter_scheduler

and checked that both the jupyter_scheduler server extension and the @jupyterlab/scheduler prebuilt lab extension are enabled.

@rwuthric Sorry you had to wait so long for the reply. “Unexpected error occurred during creation of job.” instead of HTML error and the fact that you have server extension installed means you have a different error than other posters. I created new issue #339 to separately investigate your error. Could you please run jupyter labextension list in addition to commands you already ran and post output in #339 (please also check if your jupyter --version is the same as before or just run and post it again)?

Hi all, we will dive into this and figure out what is happening. Sorry about the problems.

I have similar problem and I read through the answer given. However I feel it is still a bug. There is a lot of reason why you might not be able to use a conda environment. If conda environment is a must, shouldn’t it had been made explicit in the extension requirement list. Would it be possible to make the extension work for normal venv ?

Sincerely yours, Guillaume

Agree. Feel this issue should not yet be closed yet. I use conda environment to run my JupyterHub and still face the described bug.