Window layouts are forgotten in Spyder 5.3
See original GitHub issueIssue Report Checklist
- [ x] Searched the issues page for similar reports
- [ x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- [ x] Reproduced the issue after updating with
conda update spyder(orpip, if not using Anaconda) - [ N/A] Could not reproduce inside
jupyter qtconsole(if console-related) - [ x] Tried basic troubleshooting (if a bug/error)
- [x ] Restarted Spyder
- [x ] Reset preferences with
spyder --reset - [x ] Reinstalled the latest version of Anaconda
- [x ] Tried the other applicable steps from the Troubleshooting Guide
- [ x] Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
Since upgrading Spyder to version 5.2.2 from conda-forge in Ubuntu 20.04, I’ve had problems with the Window layouts. It appears it may be related to this stackoverfow question: Location of Spyder window layout file, despite the fact that my installation was via conda and not pip. Changes made to the window layout are not remembered after closing and restarting. Furthermore, when I go to View -> Window layouts, neither the predefined layout options (RStudio, Matlab, Vertical split, Horizontal split), nor my previously saved window layouts appear, the layout preferences option is greyed out and neither the Use next layout or Use previous layout options do anything.
Some related settings are stored in the file ~/.config/spyder-py3/config/transient.ini. Under the heading [quick_layouts] the following parameters (sorry if this is wrong terminology, I don’t know anything about ini file syntax and terminology) are set equal to empty lists after a new Spyder 5.2.2 or 5.3.0 instance is opened (not in 5.1.5 or 5.1.1): names, order, active, and ui_names. This appears to be the cause of the behaviour explained above.
The same thing occurs when I upgrade to 5.3.0.
What steps reproduce the problem?
- Create a new conda environment using conda-forge as the channel with strict priority, specifying Spyder version 5.2.2 or 5.3.0. Activate the environment and open Spyder, with
spyder &in bash. - Make any change to the window layout, e.g. resizing, removing one of the panes (such as “history”), adding a new pane (such as “find”) or move one of the panes to a new location.
- Close the window.
- Re-open a new Spyder instance as before. The previous Spyder window layout is overridden by the default.
What is the expected output? What do you see instead?
The expected output is that the previously stored window and panes layout would be remembered and that there would be a list of pre-defined window layouts to select from, available from the View menu.
Versions
- Spyder version: 5.2.2 or 5.3.0
- Python version: 3.8, 3.9 or 3.10
- Qt version: 5.12.9
- PyQt version: 5.12.3
- Operating System name/version: Ubuntu 20.04 LTS on Linux 5.13.0-39-generic
Dependencies
# Mandatory:
atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 4.0.0 (OK)
cloudpickle >=0.5.0 : 2.0.0 (OK)
cookiecutter >=1.6.0 : 1.7.3 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree >=3.0.2 : 3.0.2 (OK)
IPython >=7.6.0;<8.0.0 : 7.32.0 (OK)
jedi >=0.17.2;<0.19.0 : 0.18.1 (OK)
jellyfish >=0.7 : 0.9.0 (OK)
jsonschema >=3.2.0 : 4.4.0 (OK)
keyring >=17.0.0 : 23.4.0 (OK)
nbconvert >=4.0 : 6.4.5 (OK)
numpydoc >=0.6.0 : 1.2.1 (OK)
parso >=0.7.0;<0.9.0 : 0.8.3 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.9.0 (OK)
pygments >=2.0 : 2.11.2 (OK)
pylint >=2.5.0 : 2.13.5 (OK)
pyls_spyder >=0.4.0 : 0.4.0 (OK)
pylsp >=1.3.2;<1.4.0 : 1.3.3 (OK)
pylsp_black >=1.0.0 : 1.1.0 (OK)
qdarkstyle =3.0.2 : 3.0.2 (OK)
qstylizer >=0.1.10 : 0.2.1 (OK)
qtawesome >=1.0.2 : 1.1.1 (OK)
qtconsole >=5.2.1;<5.3.0 : 5.2.2 (OK)
qtpy >=1.5.0 : 2.0.1 (OK)
rtree >=0.9.7 : 1.0.0 (OK)
setuptools >=49.6.0 : 62.0.0 (OK)
sphinx >=0.6.6 : 4.5.0 (OK)
spyder_kernels >=2.2.1;<2.3.0 : 2.2.1 (OK)
textdistance >=4.2.0 : 4.2.2 (OK)
three_merge >=0.1.1 : 0.1.1 (OK)
watchdog >=0.10.3 : 2.1.7 (OK)
xdg >=0.26 : 0.27 (OK)
zmq >=17 : 22.3.0 (OK)
# Optional:
cython >=0.21 : None (NOK)
matplotlib >=2.0.0 : 3.5.1 (OK)
numpy >=1.7 : 1.22.3 (OK)
pandas >=1.1.1 : 1.4.2 (OK)
scipy >=0.17.0 : 1.8.0 (OK)
sympy >=0.7.3 : None (NOK)
Issue Analytics
- State:
- Created a year ago
- Comments:13 (5 by maintainers)

Top Related StackOverflow Question
I’ve verified that this issue still occurs with a single version of spyder on the system. See the update to the linked SO question:
It seems that the layouts are being stored correctly, but the closed or open status only sometimes so.
I’ve tried again now and the problem occurs the first time I open a 5.2+ instance after opening a pre-5.2.0 version. However, the second time I open a 5.2+ instance, the Toolbar reappears and changes made to the window layout the second time or later are remembered. So, that means simply closing the window and opening a new instance of Spyder of the same WINDOW_STATE_VERSION would solve the problem. However, I can also confirm that this is not a problem when going from WINDOW_STATE_VERSION = 0 (in my case 4.2.5) to WINDOW_STATE_VERSION = 1 (e.g. version 5.0.1) or back. However, it does also appear to occur in version 5.1.5, either when opening a version 5.1.5 instance after having opened a version 5.0.1 or version 5.2.2 instance, so I’m assuming the problem started with WINDOW_STATE_VERSION = 2. Below I attach screenshots of what the
Viewmenu yields when first opening in version 4.2.5 after having closed a version 5.1.1 instance, and then the same menu when opening a version 5.2.2 instance after closing a 5.1.1 instance:I can’t attach the
transient.inifile that was produced when first opening a 5.2.2 instance, as I get the messageWe don't support that file type.If I run
spyder --resetafter changing into conda environment with version 5.2+ and I’ve already closed all running instances of Spyder of version less than 5.2, then the menu seems to work correctly. I think I previously changed the conda environment after runningspyder --reset, in which case it doesn’t work.