- #1
- 7,372
- 11,337
- TL;DR Summary
- Jupyter keeps pointing out an error in a line that does not exist (it did exist but was deleted).
Ok, I wrote a small program P, initially of 16 lines in Jupyter Anaconda in Python 3.7
I deleted the last 4 lines, ending up with 12 lines in P2.
Now, I run P2 and I'm told there is a syntax error in (the inexistent) line 14.
I restarted the kernel, nothing. I opened another notebook, pasted into it, nothing, same message. Refreshed kernel, nothing.
?
Actual message:
File "<ipython-input-1-c14a518e8a8c>", line 14
SyntaxError: 'break' outside loop
I deleted the last 4 lines, ending up with 12 lines in P2.
Now, I run P2 and I'm told there is a syntax error in (the inexistent) line 14.
I restarted the kernel, nothing. I opened another notebook, pasted into it, nothing, same message. Refreshed kernel, nothing.
?
Actual message:
File "<ipython-input-1-c14a518e8a8c>", line 14
SyntaxError: 'break' outside loop