我已经安装了 Jupyter Lab,但是当我启动它时出现错误:“服务器连接错误无效响应:500 内部服务器错误”
我的 python 设置是 Anaconda,这可能与此有关。
来自命令行的完整错误消息:
jupyter实验室
[I 11:09:41.874 LabApp] [jupyter_nbextensions_configurator] 启用 0.2.8
[I 11:09:41.884 LabApp] 从 /anaconda/lib/python3.6/site-packages/jupyterlab 加载的 JupyterLab beta 预览扩展
[I 11:09:41.884 LabApp] JupyterLab 应用程序目录是 /anaconda/share/jupyter/lab
[W 11:09:41.887 LabApp] JupyterLab 服务器扩展未启用,手动加载...
[I 11:09:41.888 LabApp] 从 /anaconda/lib/python3.6/site-packages/jupyterlab 加载的 JupyterLab beta 预览扩展
[I 11:09:41.888 LabApp] JupyterLab 应用程序目录是 /anaconda/share/jupyter/lab
[I 11:09:41.896 LabApp] 服务内容
[I 11:09:41.896 LabApp] 0 个活动内核
[I 11:09:41.896 LabApp] Jupyter Notebook 运行在: http://localhost:8888/?token=ad00b52a346b46663662980c13b3da3edb1ecf8614ef1237
[I 11:09:41.896 LabApp] 使用 Control-C 停止此服务器并关闭所有内核(两次跳过确认)。
[C 11:09:41.897 LabApp]
Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8888/?token=ad00b52a346b46663662980c13b3da3edb1ecf8614ef1237
[I 11:09:42.090 LabApp] 接受来自 ::1 的一次性令牌认证连接
[W 11:09:42.740 LabApp] 在没有 nodejs 的情况下无法确定 jupyterlab 构建状态
[E 11:09:42.748 LabApp] API 请求回溯中未处理的错误(最近一次调用最后一次):文件“/anaconda/lib/python3.6/site-packages/notebook/base/handlers.py”,第 516 行,在wrapper result = yield gen.maybe_future(method(self, *args, **kwargs)) File "/anaconda/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run value = future .result() 文件“/anaconda/lib/python3.6/site-packages/tornado/concurrent.py”,第 238 行,结果 raise_exc_info(self._exc_info) 文件“”,第 4 行,在 raise_exc_info 文件“/anaconda /lib/python3.6/site-packages/tornado/gen.py”,第 1069 行,运行中产生 = self.gen.send(value) 文件“/anaconda/lib/python3.6/site-packages/notebook/服务/内容/handlers.py",第 126 行,在 get if model['type'] == 'directory' and content: TypeError: list indices must be integers or slices, not str
[E 11:09:42.753 LabApp] { "Host": "localhost:8888", "Connection": "keep-alive", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit /537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36", "Authorization": "token ad00b52a346b46663662980c13b3da3edb1ecf8614ef1237", "Content-Type": "application/json", "Accept": " / ", "Referer" : " http://localhost:8888/lab", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8", "Cookie": "_xsrf=2 |a0d1ccab|73a01490f127ec24c30835607aea1050|1520242814; username-localhost-8888=\"2|1:0|10:1521630582|23:username-localhost-8888|44:MTQwZDBhNzZlYzY5NDIxZWIyNzUxMWNkMzczZWNiMWU=|79900638f4dc105393e048f2236331a6f46520ff43b4ff010066d0196b260a00\"" }
[E 11:09:42.753 LabApp] 500 GET /api/contents/?content=1&1521630582746 (::1) 5.28ms referer= http://localhost:8888/lab
[W 11:11:05.761 LabApp] 在没有 nodejs 的情况下无法确定 jupyterlab 构建状态
[E 11:11:05.770 LabApp] API 请求回溯中未处理的错误(最近一次调用最后一次):文件“/anaconda/lib/python3.6/site-packages/notebook/base/handlers.py”,第 516 行,在wrapper result = yield gen.maybe_future(method(self, *args, **kwargs)) File "/anaconda/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run value = future .result() 文件“/anaconda/lib/python3.6/site-packages/tornado/concurrent.py”,第 238 行,结果 raise_exc_info(self._exc_info) 文件“”,第 4 行,在 raise_exc_info 文件“/anaconda /lib/python3.6/site-packages/tornado/gen.py”,第 1069 行,运行中产生 = self.gen.send(value) 文件“/anaconda/lib/python3.6/site-packages/notebook/服务/内容/handlers.py",第 126 行,在 get if model['type'] == 'directory' and content: TypeError: list indices must be integers or slices, not str
[E 11:11:05.770 LabApp] { "Host": "localhost:8888", "Connection": "keep-alive", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit /537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36", "Authorization": "token ad00b52a346b46663662980c13b3da3edb1ecf8614ef1237", "Content-Type": "application/json", "Accept": " / ", "Referer" : " http://localhost:8888/lab", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8", "Cookie": "_xsrf=2 |a0d1ccab|73a01490f127ec24c30835607aea1050|1520242814; username-localhost-8888=\"2|1:0|10:1521630665|23:username-localhost-8888|44:Y2JlODAxNzA3MDY4NDIwYWE4YTM5NGZlZDNhMThlYjE=|7ae8038d90bbf8f4d44811f23462b14cce1e930fc7f000b31c01e68a84245818\"" }
[E 11:11:05.770 LabApp] 500 GET /api/contents/?content=1&1521630665767 (::1) 1.21ms referer= http://localhost:8888/lab
[E 11:12:45.773 LabApp] API 请求回溯中未处理的错误(最近一次调用最后一次):文件“/anaconda/lib/python3.6/site-packages/notebook/base/handlers.py”,第 516 行,在wrapper result = yield gen.maybe_future(method(self, *args, **kwargs)) File "/anaconda/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run value = future .result() 文件“/anaconda/lib/python3.6/site-packages/tornado/concurrent.py”,第 238 行,结果 raise_exc_info(self._exc_info) 文件“”,第 4 行,在 raise_exc_info 文件“/anaconda /lib/python3.6/site-packages/tornado/gen.py”,第 1069 行,运行中产生 = self.gen.send(value) 文件“/anaconda/lib/python3.6/site-packages/notebook/服务/内容/handlers.py",第 126 行,在 get if model['type'] == 'directory' and content: TypeError: list indices must be integers or slices, not str [E 11:12:45.774 LabApp] { "Host": "localhost:8888 ", "Connection": "keep-alive", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36", “授权”:“令牌 ad00b52a346b46663662980c13b3da3edb1ecf8614ef1237”,“内容类型”:“应用程序/json”,“接受”:“Host": "localhost:8888", "Connection": "keep-alive", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0 .3325.162 Safari/537.36”,“授权”:“令牌 ad00b52a346b46663662980c13b3da3edb1ecf8614ef1237”,“内容类型”:“应用程序/json”,“接受”:“Host": "localhost:8888", "Connection": "keep-alive", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0 .3325.162 Safari/537.36”,“授权”:“令牌 ad00b52a346b46663662980c13b3da3edb1ecf8614ef1237”,“内容类型”:“应用程序/json”,“接受”:“内容类型”:“应用程序/json”,“接受”:“内容类型”:“应用程序/json”,“接受”:“/ ", "Referer": " http://localhost:8888/lab ", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-GB,en-US;q= 0.9,en;q=0.8", "Cookie": "_xsrf=2|a0d1ccab|73a01490f127ec24c30835607aea1050|1520242814; 用户名-localhost-8888=\"2|1:0|10:1521630765|23:用户名-localhost-8888|44:ODFhYWQ3ZDU5OWE5NDdmYTlkODhkNmMxYzg2MDlkYWI=|0dc6d8a192c6e5494080ca950923b1b291086c2d87c20086c2d87c29086c2d87c29086c2d87c20086000ca950923b1b291086c2d87c20886}
[E 11:12:45.774 LabApp] 500 GET /api/contents/?content=1&1521630765770 (::1) 1.80ms referer= http://localhost:8888/lab
[E 11:14:26.770 LabApp] API 请求回溯中未处理的错误(最近一次调用最后一次):文件“/anaconda/lib/python3.6/site-packages/notebook/base/handlers.py”,第 516 行,在wrapper result = yield gen.maybe_future(method(self, *args, **kwargs)) File "/anaconda/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run value = future .result() 文件“/anaconda/lib/python3.6/site-packages/tornado/concurrent.py”,第 238 行,结果 raise_exc_info(self._exc_info) 文件“”,第 4 行,在 raise_exc_info 文件“/anaconda /lib/python3.6/site-packages/tornado/gen.py”,第 1069 行,运行中产生 = self.gen.send(value) 文件“/anaconda/lib/python3.6/site-packages/notebook/服务/内容/handlers.py",第 126 行,在 get if model['type'] == 'directory' and content: TypeError: list indices must be integers or slices, not str
[E 11:14:26.771 LabApp] { "Host": "localhost:8888", "Connection": "keep-alive", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit /537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36", "Authorization": "token ad00b52a346b46663662980c13b3da3edb1ecf8614ef1237", "Content-Type": "application/json", "Accept": " / ", "Referer" : " http://localhost:8888/lab", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8", "Cookie": "_xsrf=2 |a0d1ccab|73a01490f127ec24c30835607aea1050|1520242814; 用户名-localhost-8888=\"2|1:0|10:1521630865|23:用户名-localhost-8888|44:MDNhNGVlZjQxZGYxNGZmN2I3ZjIyNmYzMTI2MDE5ZDI=|700d7876594cb797ba50d10173ed9132\"5988cbfeffcce0dc0dce500d7876594cb797ba50d10173ed9132\"5009578
[E 11:14:26.772 LabApp] 500 GET /api/contents/?content=1&1521630866769 (::1) 1.59ms referer= http://localhost:8888/lab[E 11:16:07.776 LabApp] API 请求回溯中未处理的错误(最近一次调用最后一次):文件“/anaconda/lib/python3.6/site-packages/notebook/base/handlers.py”,第 516 行,在wrapper result = yield gen.maybe_future(method(self, *args, **kwargs)) File "/anaconda/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run value = future .result() 文件“/anaconda/lib/python3.6/site-packages/tornado/concurrent.py”,第 238 行,结果 raise_exc_info(self._exc_info) 文件“”,第 4 行,在 raise_exc_info 文件“/anaconda /lib/python3.6/site-packages/tornado/gen.py”,第 1069 行,运行中产生 = self.gen.send(value) 文件“/anaconda/lib/python3.6/site-packages/notebook/服务/内容/handlers.py",第 126 行,在 get if model['type'] == 'directory' and content: TypeError: list indices must be integers or slices, not str
[E 11:16:07.777 LabApp] { "Host": "localhost:8888", "Connection": "keep-alive", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit /537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36", "Authorization": "token ad00b52a346b46663662980c13b3da3edb1ecf8614ef1237", "Content-Type": "application/json", "Accept": " / ", "Referer" : " http://localhost:8888/lab", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8", "Cookie": "_xsrf=2 |a0d1ccab|73a01490f127ec24c30835607aea1050|1520242814; 用户名-localhost-8888=\"2|1:0|10:1521630965|23:用户名-localhost-8888|44:MDc0MjlmODBlYTM4NDBjZDhlZjgyOTEzYTA2OTExMmU=|997eec50aacef9512c6adb31f8badfa3145c86c13b56}c86c13b56}2\
[E 11:16:07.777 LabApp] 500 GET /api/contents/?content=1&1521630967773 (::1) 1.71ms referer= http://localhost:8888/lab