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

Error upon attempting to start kernel (p.q:8) #38

Closed
rubysown opened this issue Jan 27, 2019 · 8 comments
Closed

Error upon attempting to start kernel (p.q:8) #38

rubysown opened this issue Jan 27, 2019 · 8 comments

Comments

@rubysown
Copy link

Hi, getting this error when starting the kernel in JupyterLab. I've seen other similar issues to mine, but none with this exact error message.

JupyterLab log:

[I 2019-01-27 18:05:56.533 michael.xxxx restarter:110] KernelRestarter: restarting kernel (3/5), new random ports
'2019.01.27T18:05:56.810 libpython
  [6]  /opt/conda/q/p.q:8: 
 `L`M`H set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:`$":",M;L::M]];
 .p:(`:./p 2:(`init;2))[L;H]]
    ^
'2019.01.27T18:05:56.810 cleanz
[I 2019-01-27 18:05:59.540 michael.xxxx restarter:110] KernelRestarter: restarting kernel (4/5), new random ports
'2019.01.27T18:05:59.782 libpython
  [6]  /opt/conda/q/p.q:8: 
 `L`M`H set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:`$":",M;L::M]];
 .p:(`:./p 2:(`init;2))[L;H]]
    ^
'2019.01.27T18:05:59.782 cleanz
[I 2019-01-27 18:06:02.265 michael.xxxx log:158] 200 GET /user/michael.xxxx/api/contents/?content=1&1548630361885 (michael.xxxx@::ffff:x.x.x.x) 4.44ms
[W 2019-01-27 18:06:02.545 michael.xxxx restarter:100] KernelRestarter: restart failed
[W 2019-01-27 18:06:02.545 michael.xxxx kernelmanager:127] Kernel 9ffeef30-xxxx-468e-aaf2-a5911ac6ada8 died, removing from map.

jupyter-console:

$ JUPYTERQ_DEBUG=1 jupyter-console --kernel=qpk
jupyterq_kernel: loading embedPy
jupyterq_kernel: loading pyzmq
jupyterq_kernel: zeromq socket setup
jupyterq_kernel: check imports
jupyterq_kernel: check passwords
jupyterq_kernel: start server
jupyterq_kernel: completed loading
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
Unrecognized message type history_request on channel sh
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
/opt/conda/lib/python3.6/site-packages/jupyter_console/ptshell.py:95: UserWarning: No lexer found for language 'q'. Treating as plain text.
  warn("No lexer found for language %r. Treating as plain text." % name)
Jupyter console 5.2.0

KDB+ v3.6 2018.12.24 kdb+ kernel for jupyter, jupyterQ vdevelopment


In [1]: 

embedPy:

$ q p.q
KDB+ 3.6 2018.12.24 Copyright (C) 1993-2018 Kx Systems
l64/ 2()core 3601MB michael.xxxx ip-x-x-x-x.us-west-2.compute.internal x.x.x.x EXPIRE 2020.01.24 [email protected] KOD #5000xxx

q)p)print("embedPy works")
embedPy works

Any idea's on how to troubleshoot this error?

@elopezaguilera
Copy link
Contributor

elopezaguilera commented Jan 28, 2019 via email

@rubysown
Copy link
Author

Hey, I did originally have the trial 32-bit version installed, but I thought I had removed all references (even the binary itself). Let me know if you see something off:

  • Linux install
  • Conda install:
# packages in environment at /opt/conda:
#
# Name                    Version                   Build  Channel
embedpy                   1.3.1            py36h14c3975_0    kx
ipython                   6.4.0                    py36_0  
ipython_genutils          0.2.0            py36hb52b0d5_0  
jupyterq                  1.1.5            py36h14c3975_0    kx
kdb                       3.6                  2018.12.24    kx
msgpack-python            0.5.6            py36h6bb024c_0  
python                    3.6.8                h0371630_0  
python-dateutil           2.7.3                    py36_0  
python-editor             1.0.3                     <pip>
python-oauth2             1.1.0                     <pip>

Paths:

$ which q
/opt/conda/bin/q
$ which python3
/opt/conda/bin/python3
$ which jupyter
/opt/conda/bin/jupyter

@elopezaguilera
Copy link
Contributor

elopezaguilera commented Jan 28, 2019 via email

@rubysown
Copy link
Author

rubysown commented Jan 28, 2019

$ which jupyter-lab
/opt/conda/bin/jupyter-lab
$ which jupyterhub-singleuser
/opt/conda/bin/jupyterhub-singleuser

This path seems okay too, but I just noticed our possible issue, in our particular setup, it's using python2.7 to run the Lab. Would we need to switch this to 3.6 for it to work?

/opt/conda/bin/python /opt/conda/bin/jupyterhub-singleuser [...]

@elopezaguilera
Copy link
Contributor

elopezaguilera commented Jan 28, 2019 via email

@rubysown
Copy link
Author

Upon looking at it further, I actually was mistaken, my python path is actually python3.6. Do you know what I could look into next? Thank you!

$ which python
/opt/conda/bin/python
$ /opt/conda/bin/python
Python 3.6.8 |Anaconda custom (64-bit)| (default, Dec 30 2018, 01:22:34) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

@elopezaguilera
Copy link
Contributor

elopezaguilera commented Jan 29, 2019 via email

@ctappy
Copy link

ctappy commented Feb 28, 2019

 `L`M`H set'@[system"/opt/conda/bin/python3 ",;c;{system"/opt/conda/bin/python ",c}];if[count M;if[k~key k:`$":",M;L::M]];

I am working on this project as well, after this change it is working. looks like the system python was causing the issue, we will look into getting the python3 version in the correct path it needs thanks!

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

No branches or pull requests

4 participants