Code cells not properly executed from splitted editors or new window editors
See original GitHub issueIssue Report Checklist
- Searched the issues page for similar reports
- Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- Reproduced the issue after updating with
conda update spyder
(orpip
, if not using Anaconda) - Could not reproduce inside
jupyter qtconsole
(if console-related) - Tried basic troubleshooting (if a bug/error)
- Restarted Spyder
- Reset preferences with
spyder --reset
- Reinstalled the latest version of Anaconda
- Tried the other applicable steps from the Troubleshooting Guide
- Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
The 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
What steps reproduce the problem?
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.
What is the expected output? What do you see instead?
See above
Paste Traceback/Error Below (if applicable)
n/a
Versions
- Spyder version: 4.1.2 (problem first noticed a few months ago already)
- Python version: 3.7.2 64b
- Qt version: 5.9.6
- PyQt version: 5.9.2
- Operating System name/version: Win7 64b
Dependencies
# 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)
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Code getting shuffled -- causing errors · Issue #1701
Was using the notebook and running and editing code and all of a sudden I got an error for code that is not...
Read more >User and Workspace Settings - Visual Studio Code
To open the Settings editor, use the following VS Code menu command: On Windows/Linux - File > Preferences > Settings; On macOS -...
Read more >PyCharm Scientific Mode with Code Cells
You can use code cells to divide a Python script into chunks that you can individually execute, maintaining the state between them.
Read more >Edit IPython cell in an external editor
Saving and exiting the editor replaces (but does not yet execute) the contents of the cell with that of the saved file. The...
Read more >Advanced Visual Studio Code for Python Developers
Windows or Linux: Ctrl + \. You can also open the split editor functionality by going to View → Editor Layout or by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should be fixed in https://github.com/spyder-ide/spyder/pull/12713
Thanks @impact27 !!