conda update spyder (or pip, if not using Anaconda)jupyter qtconsole (if console-related)spyder --resetThe behaviour is:
- the editor shows a red line above each occurence of #%%
- press Ctrl-Enter in any cell N
- console shows runcell(0,...
- the whole file runs as if no cells were defined
It appears to happen randomly in different files, but can also be reproduced more reliably when a second editor window is opened. The malfunction (sofar) always happened in the new window.
See above
n/a
# Mandatory:
atomicwrites >=1.2.0 : 1.2.1 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
cloudpickle >=0.5.0 : 0.6.1 (OK)
diff_match_patch >=20181111 : 20181111 (OK)
intervaltree : None (OK)
IPython >=4.0 : 7.2.0 (OK)
jedi =0.15.2 : 0.15.2 (OK)
nbconvert >=4.0 : 5.3.1 (OK)
numpydoc >=0.6.0 : 0.8.0 (OK)
paramiko >=2.4.0 : 2.4.2 (OK)
parso =0.5.2 : 0.5.2 (OK)
pexpect >=4.4.0 : 4.7.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.4.8 (OK)
pygments >=2.0 : 2.3.1 (OK)
pylint >=0.25 : 2.2.2 (OK)
pyls >=0.31.9;<0.32.0 : 0.31.9 (OK)
qdarkstyle >=2.8 : 2.8 (OK)
qtawesome >=0.5.7 : 0.5.7 (OK)
qtconsole >=4.6.0 : 4.6.0 (OK)
qtpy >=1.5.0 : 1.5.2 (OK)
rtree >=0.8.3 : 0.8.3 (OK)
sphinx >=0.6.6 : 1.8.2 (OK)
spyder_kernels >=1.9.0;<1.10.0 : 1.9.0 (OK)
watchdog : None (OK)
zmq >=17 : 17.1.2 (OK)
# Optional:
cython >=0.21 : 0.29.2 (OK)
matplotlib >=2.0.0 : 3.0.2 (OK)
numpy >=1.7 : 1.15.4 (OK)
pandas >=0.13.1 : 0.24.2 (OK)
scipy >=0.17.0 : 1.2.1 (OK)
sympy >=0.7.3 : 1.3 (OK)
Thanks for the bug report.
I haven鈥檛 seen errors in the main window yet but code cells in a new editor window and a split view are broken in 4.x. Runcell function will always return 0 and the whole file will be executed
This is a recent regression (within the last 2-3 months)
@impact27, could you take a look at this one?
Here's another observation: When I split the editor into two panels, the new one has the problem. The work-around appears to be to just run code cells from the original editor pane.
@steff456, please take a look at this one.
I had a quick look and it looks like the first code editor stack receives the command even if it was sent from another window. I think these should be handled at the plugin level
@impact27, I was checking this issue out all the day and I found out that there's something weird with the cells in splitted editors. For example, the creation of the cells is alright in the code, but in some point it changes and even the cell highlight isn't working as expected. And I think that probably fixing the highlighting out will fix as well the run cell action.

Can you please help us out to see how we may fix this issue?
Should be fixed in https://github.com/spyder-ide/spyder/pull/12713
Thanks @impact27 !!
Most helpful comment
Should be fixed in https://github.com/spyder-ide/spyder/pull/12713