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
ipython (or rather ipython3) 7.31.1 as installed in Ubuntu 22.04 (Jammy).
When typing:
try:
print("whatever") # or just any other line,
and then hitting enter, it will result in:
In [18]: try:
...: print("whatever")
File "<ipython-input-18-05e767bdfd94>", line 2
print("whatever")
^
SyntaxError: incomplete input
It is not a general problem with multi-line input like #11334, other multi-line statements like if can be typed. So far, I have only seen this with try.
It will also happen if there were lines before it:
In [28]: if 1 == 1:
...: print("I can type this")
...: try:
...: # blah
File "<ipython-input-28-b092d0cb766f>", line 4
# blah
^
SyntaxError: incomplete input
The only unpractical and kludgy workarounds that I have found to work, are copy-pasting at least 2 lines after the try: line, or using ctrl-o to add extra lines. Other things like shift-enter or leaving an empty line do not help.
The text was updated successfully, but these errors were encountered:
ipython (or rather ipython3) 7.31.1 as installed in Ubuntu 22.04 (Jammy).
When typing:
and then hitting enter, it will result in:
It is not a general problem with multi-line input like #11334, other multi-line statements like
if
can be typed. So far, I have only seen this withtry
.It will also happen if there were lines before it:
The only unpractical and kludgy workarounds that I have found to work, are copy-pasting at least 2 lines after the
try:
line, or using ctrl-o to add extra lines. Other things like shift-enter or leaving an empty line do not help.The text was updated successfully, but these errors were encountered: