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
A common work flow I have is to open a .py file, then create a console for it. I'll then interactively work, running line by line by sending to console with shift+enter. I am finding that in certain (common) situations some lines won't send to console.
I have found two work arounds:
highlight the entire row then shift+enter
put the cursor at the very initial position of the line, then shift+enter
Reproduce
Open a new .py file
right-click on it and select "create console for editor"
Create the following script
121
Sending the first line will work. Update to:
1231
Now the first line will not send.
Update to:
12312
Now the first line will send again.
Update to:
12341212
This will send, but it positions you between the first and second character of line 3.
(This assumes you're placing the cursor at the right-end of the line in these tests).
It seems if the cursor position is greater than the length of subsequent lines (combined?) it will send, but it jumps to a line-length dependent position (not always to the end of the line).
Expected behavior
The sending of code should not be line-length dependent. It should send and jump your cursor to the next line of code (and be positioned at the same relative position (beginning or end of line).
Context
Operating System and version: Linux Ubuntu 20.04
Browser and version: Chrome 123
JupyterLab version: I have tried 4.0.9, 4.1.5, 4.1.6, and 4.1.8
This does not happen prior to 4.0.0 (or at least not 3.6.6 which I previously used)
I can provide the troubleshoot and command line output, if needed, but the "out of range" error seen in the browser output seems to me that it might be sufficient info.
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
4405.43dab120fea32f30bbb9.js?v=43dab120fea32f30bbb9:1 Uncaught (in promise) RangeError: Selection points outside of document
at J (4405.43dab120fea32f30bbb9.js?v=43dab120fea32f30bbb9:1:20835)
at new gt (4405.43dab120fea32f30bbb9.js?v=43dab120fea32f30bbb9:1:27867)
at gt.create (4405.43dab120fea32f30bbb9.js?v=43dab120fea32f30bbb9:1:28001)
at vt (4405.43dab120fea32f30bbb9.js?v=43dab120fea32f30bbb9:1:30042)
at Mt.update (4405.43dab120fea32f30bbb9.js?v=43dab120fea32f30bbb9:1:32155)
at Os.dispatch (4986.a497cdda4b7152902568.js?v=a497cdda4b7152902568:1:118817)
at ne.setCursorPosition (jlab_core.b91074b1e57242ddcd31.js?v=b91074b1e57242ddcd31:1:345454)
at execute (jlab_core.b91074b1e57242ddcd31.js?v=b91074b1e57242ddcd31:1:799677)
at g.execute (jlab_core.b91074b1e57242ddcd31.js?v=b91074b1e57242ddcd31:1:1723219)
at execute (jlab_core.b91074b1e57242ddcd31.js?v=b91074b1e57242ddcd31:1:68801)
The text was updated successfully, but these errors were encountered:
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋
Welcome to the Jupyter community! 🎉
hutch3232
changed the title
send to console does not work on last line of code in file
send to console does not work
May 2, 2024
I run into very similar issue. I was able to run a single selected line by putting the cursor at the beginning of the line.
After upgrading to 4.2.0, The shortcut "Shift+Enter" does not work anymore, no matter how I place the cursor. But if I use click the "Run selected code" in the "run" menu, the line successfully runs on the console. I guess it is an issue related to keyboard shortcut.
Description
A common work flow I have is to open a
.py
file, then create a console for it. I'll then interactively work, running line by line by sending to console with shift+enter. I am finding that in certain (common) situations some lines won't send to console.I have found two work arounds:
Reproduce
.py
fileSending the first line will work. Update to:
Now the first line will not send.
Update to:
Now the first line will send again.
Update to:
This will send, but it positions you between the first and second character of line 3.
(This assumes you're placing the cursor at the right-end of the line in these tests).
It seems if the cursor position is greater than the length of subsequent lines (combined?) it will send, but it jumps to a line-length dependent position (not always to the end of the line).
Expected behavior
The sending of code should not be line-length dependent. It should send and jump your cursor to the next line of code (and be positioned at the same relative position (beginning or end of line).
Context
I can provide the troubleshoot and command line output, if needed, but the "out of range" error seen in the browser output seems to me that it might be sufficient info.
Troubleshoot Output
Command Line Output
Browser Output
The text was updated successfully, but these errors were encountered: