Jupyter notebook 笔记本电池不';在PyQ内核重新启动之前,请不要在第一个错误后运行

Jupyter notebook 笔记本电池不';在PyQ内核重新启动之前,请不要在第一个错误后运行,jupyter-notebook,kdb,pyq,Jupyter Notebook,Kdb,Pyq,我正在运行一个带有PyQ内核的jupyter笔记本,能够同时运行python和q代码。但是:每当一个单元格产生错误(比如调用一个不存在的函数()),在我重新启动内核之前,不会执行更多的单元格。相反,用Python内核,我也可以在错误之后运行其他(或相同)单元,这是正常的行为。 我在64位ubuntu上使用带虚拟环境(mypyq)的miniconda3 (mypyq) user@workstation:~$ conda --version conda 4.5.11 (mypyq) user@wor

我正在运行一个带有PyQ内核的jupyter笔记本,能够同时运行python和q代码。但是:每当一个单元格产生错误(比如调用一个不存在的函数()),在我重新启动内核之前,不会执行更多的单元格。相反,用Python内核,我也可以在错误之后运行其他(或相同)单元,这是正常的行为。 我在64位ubuntu上使用带虚拟环境(
mypyq
)的miniconda3

(mypyq) user@workstation:~$ conda --version
conda 4.5.11
(mypyq) user@workstation:~$ conda list
# packages in environment at /home/user/miniconda3/envs/mypyq:
#
# Name                    Version                   Build  Channel
<lines skipped>
kdb                       3.6                  2018.10.23    kx
pyq                       4.1.4            py36h39e3cac_0    enlnt
pyq-kernel                1.0                       <pip>
python                    3.6.7                h0371630_0  
(mypyq) user@workstation:~$ jupyter notebook --debug
<lines skipped>
单元格输出为
42
,到目前为止一切正常

现在正在笔记本中运行
nonexisting()

[D 09:38:38.266 NotebookApp] activity on ...: status
[D 09:38:38.267 NotebookApp] activity on ...: execute_input
[D 09:38:38.315 NotebookApp] activity on ...: error
[D 09:38:38.317 NotebookApp] activity on ...: status
笔记本电池输出:

------------------------------------
NameError   Traceback (most recent call last)
<ipython-input-2-124a31d9d771> in <module>
----> 1 nonexisting()

NameError: name 'nonexisting' is not defined
我至少缺少控制台中的
…:execute\u result
。笔记本中也没有输出,直到我重新启动内核

Shutdown this notebook server (y/[n])? y
[C 11:03:05.086 NotebookApp] Shutdown confirmed
[I 11:03:05.086 NotebookApp] Shutting down 1 kernel
[D 11:03:10.100 NotebookApp] Kernel is taking too long to finish, killing
[I 11:03:10.106 NotebookApp] Kernel shutdown:
Python内核不会发生这种情况,只有PyQ内核才会发生这种情况。在控制台中运行PyQ也可以:

(mypyq) user@workstation:~$ pyq
Python 3.6.7 |Anaconda, Inc.| (default, Oct 23 2018, 19:19:38) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> q('9#til 3')
k('0 1 2 0 1 2 0 1 2')
>>> nonexisting()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'nonexisting' is not defined
>>> 6*7
42
>>> exit()
(mypyq) user@workstation:~$ pyq -m IPython
Python 3.6.7 |Anaconda, Inc.| (default, Oct 23 2018, 19:19:38) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.2.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: %load_ext pyq.magic                                                                                                          

In [2]: from pyq import q                                                                                                            

In [3]: q.til(10)                                                                                                                    
Out[3]: 0 1 2 3 4 5 6 7 8 9

In [4]: nonexisting()                                                                                                                
-------------------------------------------------------
NameError             Traceback (most recent call last)
<ipython-input-4-124a31d9d771> in <module>
----> 1 nonexisting()

NameError: name 'nonexisting' is not defined

In [5]: q.til(10)                                                                                                                    
Out[5]: 0 1 2 3 4 5 6 7 8 9

In [6]: exit()

此错误已在中修复。谢谢你的报告

要升级,请运行:

pip install -U pyq-kernel
pyq -m pyq.kernel install

以后,请随时在中打开该问题,以获得更快的响应。

感谢您的报告,我们正在对此进行调查。如果您在PyQ项目()的bug跟踪器中打开问题,而不是在这里提问,这会有所帮助。谢谢您的检查!提交。pyq内核1.0.1到目前为止没有帮助。我甚至怀疑更新是否有效<代码>从pyq导入;q('.z.ts')返回
{@[i1;();::]}
,显然是的。
Shutdown this notebook server (y/[n])? y
[C 11:03:05.086 NotebookApp] Shutdown confirmed
[I 11:03:05.086 NotebookApp] Shutting down 1 kernel
[D 11:03:10.100 NotebookApp] Kernel is taking too long to finish, killing
[I 11:03:10.106 NotebookApp] Kernel shutdown:
pip install -U pyq-kernel
pyq -m pyq.kernel install