You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
running code-cells-eval in the first cell raises a Jupyter error "UsageError: Line magic function %%timeit not found.". Instead, manually selecting the four lines of the first cell and running jupyter-eval-region runs correctly, giving the execution time in a buffer named *jupyter-output*.
The second cell runs properly (createing two buffers, one named *jupyter-result* with the result and another named *jupyter-output* with the measured execution time).
How can this be fixed? I suppose that it is an issue of how code-cells sends the cell code to emacs-jupyter given that jupyter-eval-region works properly.
Thank you in advance. Best,
Martí
The text was updated successfully, but these errors were encountered:
Puzzling. code-cells-eval sends the whole cell, including the comment header # %%, to the REPL. Could that be the cause of the trouble? In this case one would have to argue that this is not a bug in Jupyter...
I suppose that including the comment header is indeed the cause of the trouble, because when I select the whole cell including the commend header and run it using jupyter-eval-region, I get the same error.
I therefore do not think that it is a bug in Jupyter as cell magic is supposed to be at the first line of the cell (regardless of comments). In any case, it is not a big deal and for other users encountering this issue, using the jupyter-eval-region approach as workaround is quite straightforward.
Consider the following notebook with an associated emacs-jupyter REPL:
running
code-cells-eval
in the first cell raises a Jupyter error "UsageError: Line magic function%%timeit
not found.". Instead, manually selecting the four lines of the first cell and runningjupyter-eval-region
runs correctly, giving the execution time in a buffer named*jupyter-output*
.The second cell runs properly (createing two buffers, one named
*jupyter-result*
with the result and another named*jupyter-output*
with the measured execution time).How can this be fixed? I suppose that it is an issue of how code-cells sends the cell code to emacs-jupyter given that
jupyter-eval-region
works properly.Thank you in advance. Best,
Martí
The text was updated successfully, but these errors were encountered: