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

Launcher Error: Invalid response: 500 Internal Server Error #8194

Open
imoisharma opened this issue Apr 8, 2020 · 8 comments
Open

Launcher Error: Invalid response: 500 Internal Server Error #8194

imoisharma opened this issue Apr 8, 2020 · 8 comments

Comments

@imoisharma
Copy link

imoisharma commented Apr 8, 2020

Description

image

Reproduce

Everything works fine except the terminal whenever I click the terminal it shows me the error 500. Please help me to resolve this issue

  1. Go to 'Launcher'
  2. Click on 'Terminal'
  3. Scroll down to 'Terminal'
  4. See error '500 Internal Server Error'

Expected behaviour

See the terminal running

Context

  • Operating System and version: Windows 10 Home, 16GB RAM, 4 Nvidia 1050Ti
  • Browser and version: Version 80.0.3987.149 (Official Build) (64-bit) (Google Chrome Version)
  • JupyterLab version: 1.2.6
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.
Please ask me any more details if you need
@blink1073
Copy link
Member

Hi @imoisharma, can you please try upgrading to either 1.2.13 or 2.1.1, which will give you a traceback in that dialog if it fails again.

@ezekini
Copy link

ezekini commented May 12, 2020

I am having the same issue and tried every solution I could find on the web. Every time I try to open a notebook or create one I get the Invalid response: 500 Internal Server Error. This is from a new miniconda installation, with a new conda env with just jupyter lab (2.1.2). I tried installing with conda, with pip, using the powershell to launch, using the regular prompt, etc. Nothings seems to work. Any ideas on what is wrong?

Thank you

This is the log from the console ``` (acnml) PS C:\Users\elece> jupyter lab [I 20:06:25.722 LabApp] JupyterLab extension loaded from c:\users\elece\miniconda3\envs\acnml\lib\site-packages\jupyterlab [I 20:06:25.722 LabApp] JupyterLab application directory is c:\users\elece\miniconda3\envs\acnml\share\jupyter\lab [I 20:06:25.725 LabApp] Serving notebooks from local directory: C:\Users\elece [I 20:06:25.726 LabApp] The Jupyter Notebook is running at: [I 20:06:25.726 LabApp] http://localhost:8888/?token=74d8e929cc1bf72bb04f2ec4390cf868514d4f715150eb94 [I 20:06:25.726 LabApp] or http://127.0.0.1:8888/?token=74d8e929cc1bf72bb04f2ec4390cf868514d4f715150eb94 [I 20:06:25.726 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 20:06:25.788 LabApp]
To access the notebook, open this file in a browser:
    file:///C:/Users/elece/AppData/Roaming/jupyter/runtime/nbserver-12472-open.html
Or copy and paste one of these URLs:
    http://localhost:8888/?token=74d8e929cc1bf72bb04f2ec4390cf868514d4f715150eb94
 or http://127.0.0.1:8888/?token=74d8e929cc1bf72bb04f2ec4390cf868514d4f715150eb94

[W 20:06:31.336 LabApp] Could not determine jupyterlab build status without nodejs
[E 20:06:32.424 LabApp] Failed to run command:
['C:\Users\elece\AAnaconda3\envs\accml\python.exe', '-m', 'ipykernel_launcher', '-f', 'C:\Users\elece\AppData\Roaming\jupyter\runtime\kernel-f501ba51-45d4-4b19-af01-3b4131db348f.json']
PATH='c:\users\elece\miniconda3\envs\acnml\lib\site-packages\pywin32_system32;c:\users\elece\miniconda3\envs\acnml\lib\site-packages\pywin32_system32;C:\Users\elece\Miniconda3\envs\acnml;C:\Users\elece\Miniconda3\envs\acnml\Library\mingw-w64\bin;C:\Users\elece\Miniconda3\envs\acnml\Library\usr\bin;C:\Users\elece\Miniconda3\envs\acnml\Library\bin;C:\Users\elece\Miniconda3\envs\acnml\Scripts;C:\Users\elece\Miniconda3\envs\acnml\bin;C:\Users\elece\Miniconda3\condabin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\windows\System32\OpenSSH;C:\Users\elece\AppData\Local\Microsoft\WindowsApps;.'
with kwargs:
{'stdin': -1, 'stdout': None, 'stderr': None, 'cwd': 'C:\Users\elece', 'close_fds': False}

[E 20:06:32.424 LabApp] Uncaught exception POST /api/sessions?1589324791798 (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='POST', uri='/api/sessions?1589324791798', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\tornado\web.py", line 1703, in _execute
result = await result
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
type=mtype))
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(exc_info) # type: ignore
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(exc_info) # type: ignore
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\tornado\gen.py", line 209, in wrapper
yielded = next(result)
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\jupyter_client\multikernelmanager.py", line 158, in start_kernel
km.start_kernel(**kwargs)
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\jupyter_client\manager.py", line 305, in start_kernel
self.kernel = self._launch_kernel(kernel_cmd, **kw)
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\jupyter_client\manager.py", line 212, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "c:\users\elece\miniconda3\envs\acnml\lib\site-packages\jupyter_client\launcher.py", line 135, in launch_kernel
proc = Popen(cmd, **kwargs)
File "c:\users\elece\miniconda3\envs\acnml\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "c:\users\elece\miniconda3\envs\acnml\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
[W 20:06:32.429 LabApp] Unhandled error
[E 20:06:32.431 LabApp] {
"Host": "localhost:8888",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0",
"Accept": "
/
",
"Accept-Language": "es-AR,en;q=0.8,es;q=0.5,en-US;q=0.3",
"Accept-Encoding": "gzip, deflate",
"Referer": "http://localhost:8888/lab",
"Content-Type": "application/json",
"Authorization": "token 74d8e929cc1bf72bb04f2ec4390cf868514d4f715150eb94",
"X-Xsrftoken": "2|76d3a855|89f2ea9d9f0bed14f278c60a0ad722dc|1587841637",
"Origin": "http://localhost:8888",
"Content-Length": "122",
"Dnt": "1",
"Connection": "keep-alive",
"Cookie": "_xsrf=2|76d3a855|89f2ea9d9f0bed14f278c60a0ad722dc|1587841637; username-localhost-8888="2|1:0|10:1589324791|23:username-localhost-8888|44:YzBjNjI3MGNjMjZkNDdiMmE4OTFlZDlkMjI1MzgxZWE=|e9d083c19a84a1349ea80cfc019d3592591fc14cb1d448ba20c3a151a2daa93a"",
"Pragma": "no-cache",
"Cache-Control": "no-cache"
}
[E 20:06:32.432 LabApp] 500 POST /api/sessions?1589324791798 (127.0.0.1) 599.19ms referer=http://localhost:8888/lab

</details>

@slucyp
Copy link

slucyp commented Jun 12, 2020

I have the same issue, and the error messages are as follows:
[E 00:31:24.676 LabApp] Uncaught exception POST /api/terminals?1591936284668 (::1) HTTPServerRequest(protocol='http', host='localhost:8888', method='POST', uri='/api/terminals?1591936284668', version='HTTP/1.1', remote_ip='::1') Traceback (most recent call last): File "C:\Users\Lucy\AppData\Roaming\Python\Python37\site-packages\tornado\web.py", line 1590, in _execute result = method(*self.path_args, **self.path_kwargs) File "C:\Users\Lucy\AppData\Roaming\Python\Python37\site-packages\tornado\web.py", line 3006, in wrapper return method(self, *args, **kwargs) File "C:\Users\Lucy\anaconda3\lib\site-packages\notebook\terminal\api_handlers.py", line 22, in post name, _ = self.terminal_manager.new_named_terminal() File "C:\Users\Lucy\anaconda3\lib\site-packages\terminado\management.py", line 319, in new_named_terminal term = self.new_terminal(**kwargs) File "C:\Users\Lucy\anaconda3\lib\site-packages\terminado\management.py", line 171, in new_terminal pty = PtyProcessUnicode.spawn(argv, env=env, cwd=options.get('cwd', None)) File "C:\Users\Lucy\anaconda3\lib\site-packages\winpty\ptyprocess.py", line 89, in spawn 'executable: %s.' % command FileNotFoundError: The command was not found or was not executable: powershell.exe. [W 00:31:24.678 LabApp] Unhandled error [E 00:31:24.681 LabApp] { "Host": "localhost:8888", "Connection": "keep-alive", "Content-Length": "0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36", "X-Xsrftoken": "2|c78d6b3f|c80af0d87da8d016f4bdd2ca604d9470|1591847174", "Authorization": "token af1d44cdd7dd3cfda51d10c423be1100d8494d7983c0a1c7", "Content-Type": "application/json", "Accept": "*/*", "Origin": "http://localhost:8888", "Sec-Fetch-Site": "same-origin", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Dest": "empty", "Referer": "http://localhost:8888/lab", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7", "Cookie": "_xsrf=2|c78d6b3f|c80af0d87da8d016f4bdd2ca604d9470|1591847174; username-localhost-8888=\"2|1:0|10:1591936282|23:username-localhost-8888|44:ZTU1ZjcwMzNjMDc3NDdmOTkwZWZiM2NiOWE2ZDBhOGI=|f083b617a3850e373bce4f4adea7124ed696849a0c83b898699027e8cce76b1e\"" } [E 00:31:24.681 LabApp] 500 POST /api/terminals?1591936284668 (::1) 6.98ms referer=http://localhost:8888/lab
Thanks very much for the help!

@jasongrout
Copy link
Contributor

Is this still an issue?

@JoaoFerreira7
Copy link

Did anyone find a solution for this? I am currently experiencing the same problem and I have tried every solution I have found on the web but I couldn't successfully fix it.

Any help would be appreciated!

@krassowski
Copy link
Member

@JoaoFerreira7 what version of jupyterlab, terminado, and jupyter-server do you have installed? Does your terminal output also include FileNotFoundError: The command was not found or was not executable: powershell.exe error as the one reported by @slucyp?

@JoaoFerreira7
Copy link

@krassowski

  • I have the following versions:
    jupyterlab: 3.2.1
    terminado: 0.9.4
    jupyter-server: 1.4.1

  • Yes, my terminal output also includes the FileNotFoundError: The command was not found or was not executable: powershell.exe.
    I have to use the PowerShell directly from anaconda as I still didn't find any solution to this.

@frp1719500292
Copy link

I have the same issue, and the error messages are as follows: [E 00:31:24.676 LabApp] Uncaught exception POST /api/terminals?1591936284668 (::1) HTTPServerRequest(protocol='http', host='localhost:8888', method='POST', uri='/api/terminals?1591936284668', version='HTTP/1.1', remote_ip='::1') Traceback (most recent call last): File "C:\Users\Lucy\AppData\Roaming\Python\Python37\site-packages\tornado\web.py", line 1590, in _execute result = method(*self.path_args, **self.path_kwargs) File "C:\Users\Lucy\AppData\Roaming\Python\Python37\site-packages\tornado\web.py", line 3006, in wrapper return method(self, *args, **kwargs) File "C:\Users\Lucy\anaconda3\lib\site-packages\notebook\terminal\api_handlers.py", line 22, in post name, _ = self.terminal_manager.new_named_terminal() File "C:\Users\Lucy\anaconda3\lib\site-packages\terminado\management.py", line 319, in new_named_terminal term = self.new_terminal(**kwargs) File "C:\Users\Lucy\anaconda3\lib\site-packages\terminado\management.py", line 171, in new_terminal pty = PtyProcessUnicode.spawn(argv, env=env, cwd=options.get('cwd', None)) File "C:\Users\Lucy\anaconda3\lib\site-packages\winpty\ptyprocess.py", line 89, in spawn 'executable: %s.' % command FileNotFoundError: The command was not found or was not executable: powershell.exe. [W 00:31:24.678 LabApp] Unhandled error [E 00:31:24.681 LabApp] { "Host": "localhost:8888", "Connection": "keep-alive", "Content-Length": "0", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36", "X-Xsrftoken": "2|c78d6b3f|c80af0d87da8d016f4bdd2ca604d9470|1591847174", "Authorization": "token af1d44cdd7dd3cfda51d10c423be1100d8494d7983c0a1c7", "Content-Type": "application/json", "Accept": "*/*", "Origin": "http://localhost:8888", "Sec-Fetch-Site": "same-origin", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Dest": "empty", "Referer": "http://localhost:8888/lab", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7", "Cookie": "_xsrf=2|c78d6b3f|c80af0d87da8d016f4bdd2ca604d9470|1591847174; username-localhost-8888=\"2|1:0|10:1591936282|23:username-localhost-8888|44:ZTU1ZjcwMzNjMDc3NDdmOTkwZWZiM2NiOWE2ZDBhOGI=|f083b617a3850e373bce4f4adea7124ed696849a0c83b898699027e8cce76b1e\"" } [E 00:31:24.681 LabApp] 500 POST /api/terminals?1591936284668 (::1) 6.98ms referer=http://localhost:8888/lab Thanks very much for the help!

I have encountered the same issue too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants