mmisono / ipython_mysql_kernel

a simple mysql kernel for ipytnon
11 stars 2 forks source link

Kernel crashing #1

Open fkotey opened 7 years ago

fkotey commented 7 years ago

I just downloaded this kernel and have installed it. However, it keeps crashing. Any idea how to fix that? Thanks.

mmisono commented 7 years ago

I created this kernel more than a year ago and recently I've not used it. So maybe there are some problems. Could you show the error messages?

fkotey commented 7 years ago

This is the message from the log.

[I 02:33:26.867 NotebookApp] Loading IPython parallel extension [I 02:33:27.021 NotebookApp] Serving notebooks from local directory: F:\OneDrive\Code_Library\Notebooks [I 02:33:27.021 NotebookApp] 0 active kernels [I 02:33:27.022 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=1565e9bbb0253c3c195bfc0b19b6158a27a769e4f3b3cc29 [I 02:33:27.022 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 02:33:27.026 NotebookApp]

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
    http://localhost:8888/?token=1565e9bbb0253c3c195bfc0b19b6158a27a769e4f3b3cc29

[I 02:33:27.315 NotebookApp] Accepting one-time-token-authenticated connection from 127.0.0.1 [I 02:33:34.502 NotebookApp] Creating new notebook in [I 02:33:35.753 NotebookApp] Kernel started: 0dc91ec0-eae2-4c6f-bc5a-b00ab9c592b8 D:\Programming\Anaconda3\lib\site-packages\IPython\kernel__init.py:13: ShimWarning: The IPython.kernel package has been deprecated since IPython 4.0.You should import from ipykernel or jupyter_client instead. "You should import from ipykernel or jupyter_client instead.", ShimWarning) Traceback (most recent call last): File "D:\Programming\Anaconda3\Lib\site-packages\ipython_mysql_kernel\kernel.py", line 559, in IPKernelApp.launch_instance(kernel_class=MySQLKernel) File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\application.py", line 657, in launch_instance app.initialize(argv) File "", line 2, in initialize File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, *args, kwargs) File "D:\Programming\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 457, in initialize self.init_kernel() File "D:\Programming\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 368, in init_kernel user_ns=self.user_ns, File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\configurable.py", line 412, in instance inst = cls(args, kwargs) File "D:\Programming\Anaconda3\Lib\site-packages\ipython_mysql_kernel\kernel.py", line 352, in init self.mysql_config.update(json.load(f)) File "D:\Programming\Anaconda3\lib\json__init__.py", line 299, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, kw) File "D:\Programming\Anaconda3\lib\json__init.py", line 354, in loads return _default_decoder.decode(s) File "D:\Programming\Anaconda3\lib\json\decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "D:\Programming\Anaconda3\lib\json\decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 4 column 5 (char 59) [I 02:33:38.734 NotebookApp] KernelRestarter: restarting kernel (1/5) D:\Programming\Anaconda3\lib\site-packages\IPython\kernel\init__.py:13: ShimWarning: The IPython.kernel package has been deprecated since IPython 4.0.You should import from ipykernel or jupyter_client instead. "You should import from ipykernel or jupyter_client instead.", ShimWarning) Traceback (most recent call last): File "D:\Programming\Anaconda3\Lib\site-packages\ipython_mysql_kernel\kernel.py", line 559, in IPKernelApp.launch_instance(kernel_class=MySQLKernel) File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\application.py", line 657, in launch_instance app.initialize(argv) File "", line 2, in initialize File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, args, kwargs) File "D:\Programming\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 457, in initialize self.init_kernel() File "D:\Programming\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 368, in init_kernel user_ns=self.user_ns, File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\configurable.py", line 412, in instance inst = cls(*args, **kwargs) File "D:\Programming\Anaconda3\Lib\site-packages\ipython_mysql_kernel\kernel.py", line 352, in init self.mysql_config.update(json.load(f)) File "D:\Programming\Anaconda3\lib\json__init.py", line 299, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "D:\Programming\Anaconda3\lib\json\init.py", line 354, in loads return _default_decoder.decode(s) File "D:\Programming\Anaconda3\lib\json\decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "D:\Programming\Anaconda3\lib\json\decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 4 column 5 (char 59) [I 02:33:41.736 NotebookApp] KernelRestarter: restarting kernel (2/5) D:\Programming\Anaconda3\lib\site-packages\IPython\kernel\init__.py:13: ShimWarning: The IPython.kernel package has been deprecated since IPython 4.0.You should import from ipykernel or jupyter_client instead. "You should import from ipykernel or jupyter_client instead.", ShimWarning) Traceback (most recent call last): File "D:\Programming\Anaconda3\Lib\site-packages\ipython_mysql_kernel\kernel.py", line 559, in IPKernelApp.launch_instance(kernel_class=MySQLKernel) File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\application.py", line 657, in launch_instance app.initialize(argv) File "", line 2, in initialize File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, *args, *kwargs) File "D:\Programming\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 457, in initialize self.init_kernel() File "D:\Programming\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 368, in init_kernel user_ns=self.user_ns, File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\configurable.py", line 412, in instance inst = cls(args, **kwargs) File "D:\Programming\Anaconda3\Lib\site-packages\ipython_mysql_kernel\kernel.py", line 352, in init self.mysql_config.update(json.load(f)) File "D:\Programming\Anaconda3\lib\json__init.py", line 299, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "D:\Programming\Anaconda3\lib\json\init.py", line 354, in loads return _default_decoder.decode(s) File "D:\Programming\Anaconda3\lib\json\decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "D:\Programming\Anaconda3\lib\json\decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 4 column 5 (char 59) [I 02:33:44.749 NotebookApp] KernelRestarter: restarting kernel (3/5) D:\Programming\Anaconda3\lib\site-packages\IPython\kernel\init__.py:13: ShimWarning: The IPython.kernel package has been deprecated since IPython 4.0.You should import from ipykernel or jupyter_client instead. "You should import from ipykernel or jupyter_client instead.", ShimWarning) Traceback (most recent call last): File "D:\Programming\Anaconda3\Lib\site-packages\ipython_mysql_kernel\kernel.py", line 559, in IPKernelApp.launch_instance(kernel_class=MySQLKernel) File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\application.py", line 657, in launch_instance app.initialize(argv) File "", line 2, in initialize File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, *args, *kwargs) File "D:\Programming\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 457, in initialize self.init_kernel() File "D:\Programming\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 368, in init_kernel user_ns=self.user_ns, File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\configurable.py", line 412, in instance inst = cls(args, **kwargs) File "D:\Programming\Anaconda3\Lib\site-packages\ipython_mysql_kernel\kernel.py", line 352, in init self.mysql_config.update(json.load(f)) File "D:\Programming\Anaconda3\lib\json__init.py", line 299, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "D:\Programming\Anaconda3\lib\json__init__.py", line 354, in loads return _default_decoder.decode(s) File "D:\Programming\Anaconda3\lib\json\decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "D:\Programming\Anaconda3\lib\json\decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 4 column 5 (char 59) [W 02:33:45.988 NotebookApp] Timeout waiting for kernel_info reply from 0dc91ec0-eae2-4c6f-bc5a-b00ab9c592b8 [I 02:33:47.750 NotebookApp] KernelRestarter: restarting kernel (4/5) WARNING:root:kernel 0dc91ec0-eae2-4c6f-bc5a-b00ab9c592b8 restarted D:\Programming\Anaconda3\lib\site-packages\IPython\kernel\init__.py:13: ShimWarning: The IPython.kernel package has been deprecated since IPython 4.0.You should import from ipykernel or jupyter_client instead. "You should import from ipykernel or jupyter_client instead.", ShimWarning) Traceback (most recent call last): File "D:\Programming\Anaconda3\Lib\site-packages\ipython_mysql_kernel\kernel.py", line 559, in IPKernelApp.launch_instance(kernel_class=MySQLKernel) File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\application.py", line 657, in launch_instance app.initialize(argv) File "", line 2, in initialize File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, *args, *kwargs) File "D:\Programming\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 457, in initialize self.init_kernel() File "D:\Programming\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 368, in init_kernel user_ns=self.user_ns, File "D:\Programming\Anaconda3\lib\site-packages\traitlets\config\configurable.py", line 412, in instance inst = cls(args, **kwargs) File "D:\Programming\Anaconda3\Lib\site-packages\ipython_mysql_kernel\kernel.py", line 352, in init__ self.mysql_config.update(json.load(f)) File "D:\Programming\Anaconda3\lib\json__init.py", line 299, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "D:\Programming\Anaconda3\lib\json\init__.py", line 354, in loads return _default_decoder.decode(s) File "D:\Programming\Anaconda3\lib\json\decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "D:\Programming\Anaconda3\lib\json\decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 4 column 5 (char 59) [W 02:33:50.783 NotebookApp] KernelRestarter: restart failed [W 02:33:50.783 NotebookApp] Kernel 0dc91ec0-eae2-4c6f-bc5a-b00ab9c592b8 died, removing from map. ERROR:root:kernel 0dc91ec0-eae2-4c6f-bc5a-b00ab9c592b8 restarted failed! [W 02:33:50.815 NotebookApp] Kernel deleted before session [W 02:33:50.815 NotebookApp] 410 DELETE /api/sessions/e8e4bb41-a249-4658-af56-bfa1024e1e01 (127.0.0.1) 0.98ms referer=http://localhost:8888/notebooks/Untitled4.ipynb?kernel_name=mysql_kernel

mmisono commented 7 years ago

It seems this line causes the problem. It failed to the decode json file. Does your mysql_config.json have appropriate json format? In addition to this, I've never run this kernel on Windows. So there might be some windows related problems. (I'm not sure that pexpect works on Windows)