Spyder: Changing appearance font size in Preferences results in a crash.

Created on 9 Sep 2020  Â·  7Comments  Â·  Source: spyder-ide/spyder

Description

What steps will reproduce the problem?

With fresh install on Windows 10, selected Tools->Preferences->Appearance, then increase font size to 14, select apply, spyder crashes.

When spyder is restated the new font size that was selected before the crash is being used.

Traceback

  File "C:\Tellurium-Winpython-3.7\python-3.7.7.amd64\lib\site-packages\spyder\preferences\configdialog.py", line 236, in button_clicked
    configpage.apply_changes()
  File "C:\Tellurium-Winpython-3.7\python-3.7.7.amd64\lib\site-packages\spyder\preferences\configdialog.py", line 99, in apply_changes
    self.apply_callback()
  File "C:\Tellurium-Winpython-3.7\python-3.7.7.amd64\lib\site-packages\spyder\preferences\configdialog.py", line 282, in <lambda>
    self.apply_settings(self.changed_options))
  File "C:\Tellurium-Winpython-3.7\python-3.7.7.amd64\lib\site-packages\spyder\preferences\appearance.py", line 236, in apply_settings
    self.main.apply_settings()
  File "C:\Tellurium-Winpython-3.7\python-3.7.7.amd64\lib\site-packages\spyder\app\mainwindow.py", line 3122, in apply_settings
    self.apply_panes_settings()
  File "C:\Tellurium-Winpython-3.7\python-3.7.7.amd64\lib\site-packages\spyder\app\mainwindow.py", line 3137, in apply_panes_settings
    plugin._update_margins()
  File "C:\Tellurium-Winpython-3.7\python-3.7.7.amd64\lib\site-packages\spyder\plugins\base.py", line 230, in _update_margins
    self._default_margins = layout.getContentsMargins()
AttributeError: 'NoneType' object has no attribute 'getContentsMargins'

Versions

  • Spyder version: 4.1.4
  • Python version: 3.7.7
  • Qt version: 5.12.9
  • PyQt5 version: 5.12.3
  • Operating System: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0           :  1.4.0 (OK)
chardet >=2.0.0                :  3.0.4 (OK)
cloudpickle >=0.5.0            :  1.5.0 (OK)
diff_match_patch >=20181111    :  20181111 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.16.1 (OK)
jedi =0.17.1                   :  0.17.1 (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  1.1.0 (OK)
paramiko >=2.4.0               :  2.7.1 (OK)
parso =0.7.0                   :  0.7.0 (OK)
pexpect >=4.4.0                :  4.8.0 (OK)
pickleshare >=0.4              :  0.7.5 (OK)
psutil >=5.3                   :  5.7.0 (OK)
pygments >=2.0                 :  2.6.1 (OK)
pylint >=1.0                   :  2.5.3 (OK)
pyls >=0.34.0;<1.0.0           :  0.34.1 (OK)
qdarkstyle >=2.8               :  2.8.1 (OK)
qtawesome >=0.5.7              :  0.7.2 (OK)
qtconsole >=4.6.0              :  4.7.5 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
sphinx >=0.6.6                 :  3.1.2 (OK)
spyder_kernels >=1.9.2;<1.10.0 :  1.9.3 (OK)
watchdog                       :  None (OK)
zmq >=17                       :  19.0.1 (OK)

# Optional:
cython >=0.21                  :  None (OK)
matplotlib >=2.0.0             :  3.2.2 (OK)
numpy >=1.7                    :  1.19.0 (OK)
pandas >=0.13.1                :  1.0.5 (OK)
scipy >=0.17.0                 :  1.5.1 (OK)
sympy >=0.7.3                  :  1.6.1 (OK)

# Spyder plugins:
spyder_opensbml                :  1.1.0 (OK)
spyder_teimport                :  1.1.2 (OK)
Awaiting Followup

Most helpful comment

I understand. We're currently on 4.1.4, once 4.1.5 is out we'll move to
that to see if it helps.

Thanks for great tool.

Herbert Sauro

On Thu, Sep 10, 2020 at 2:40 PM Carlos Cordoba notifications@github.com
wrote:

Ok, thanks @dalthviz https://github.com/dalthviz for your help. Closing
because we were not able to reproduce it, sorry.

Please report this problem to the WinPython guys:

https://github.com/winpython/winpython

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/13748#issuecomment-690746325,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAIBSDVRRWCJMR7Q3TPO37TSFFBRBANCNFSM4RDCMRBA
.

--
Herbert Sauro, Professor
University of Washington, Bioengineering
206-685-2119, www.sys-bio.org
[email protected]
Books: http://books.analogmachine.org/

All 7 comments

Hi @hsauro could you try to reset your Spyder preferences and try again? Thanks!

You can do that by going to the menu Tools > Reset Spyder to factory defaults.

I reset spyder using reset to factory defaults, and I confirm that fonts
went back to the original size.

I then tried to change the editor and console fonts using
Tools->Preferences-> Appearance->Fonts->Plain text Change to 14 pt, hit Ok
or Apply buttons

There is a delay of about 5 seconds then the Issue reporter comes up with
details:

update_margins
self._default_margins = layout.getContentsMargins()
AttributeError: 'NoneType' object has no attribute 'getContentsMargins'

I restart spyder and the fonts can be seen to have changed.

On Wed, Sep 9, 2020 at 6:04 PM Carlos Cordoba notifications@github.com
wrote:

You can do that by going to the menu Tools > Reset Spyder to factory
defaults.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/13748#issuecomment-689907303,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAIBSDVJ4CWKNZDQPDK7WXDSFAQYJANCNFSM4RDCMRBA
.

--
Herbert Sauro, Professor
University of Washington, Bioengineering
206-685-2119, www.sys-bio.org
[email protected]
Books: http://books.analogmachine.org/

@dalthviz, please try to reproduce this problem on Windows with a pip environment.

@ccordoba12 I tried reproducing this with this env:

Package                       Version
----------------------------- -------------------
alabaster                     0.7.12
astroid                       2.4.2
async-generator               1.10
atomicwrites                  1.4.0
attrs                         20.2.0
autopep8                      1.5.4
Babel                         2.8.0
backcall                      0.2.0
bcrypt                        3.2.0
bleach                        3.1.5
certifi                       2020.6.20
cffi                          1.14.2
chardet                       3.0.4
cloudpickle                   1.6.0
colorama                      0.4.3
cryptography                  3.1
decorator                     4.4.2
defusedxml                    0.6.0
diff-match-patch              20200713
docutils                      0.16
entrypoints                   0.3
flake8                        3.8.3
helpdev                       0.7.1
idna                          2.10
imagesize                     1.2.0
importlib-metadata            1.7.0
intervaltree                  3.1.0
ipykernel                     5.3.4
ipython                       7.18.1
ipython-genutils              0.2.0
isort                         5.5.2
jedi                          0.17.1
Jinja2                        2.11.2
jsonschema                    3.2.0
jupyter-client                6.1.7
jupyter-core                  4.6.3
jupyterlab-pygments           0.1.1
keyring                       21.4.0
lazy-object-proxy             1.4.3
MarkupSafe                    1.1.1
mccabe                        0.6.1
mistune                       0.8.4
nbclient                      0.5.0
nbconvert                     6.0.1
nbformat                      5.0.7
nest-asyncio                  1.4.0
numpydoc                      1.1.0
packaging                     20.4
pandocfilters                 1.4.2
paramiko                      2.7.2
parso                         0.7.0
pathtools                     0.1.2
pexpect                       4.8.0
pickleshare                   0.7.5
pip                           20.2.2
pluggy                        0.13.1
prompt-toolkit                3.0.7
psutil                        5.7.2
ptyprocess                    0.6.0
pycodestyle                   2.6.0
pycparser                     2.20
pydocstyle                    5.1.1
pyflakes                      2.2.0
Pygments                      2.6.1
pylint                        2.6.0
PyNaCl                        1.4.0
pyparsing                     2.4.7
PyQt5                         5.12.3
PyQt5-sip                     12.8.1
PyQtWebEngine                 5.12.1
pyrsistent                    0.16.0
python-dateutil               2.8.1
python-jsonrpc-server         0.4.0
python-language-server        0.34.1
pytz                          2020.1
pywin32                       228
pywin32-ctypes                0.2.0
pyzmq                         19.0.2
QDarkStyle                    2.8.1
QtAwesome                     0.7.2
qtconsole                     4.7.7
QtPy                          1.9.0
requests                      2.24.0
rope                          0.17.0
setuptools                    49.6.0.post20200814
six                           1.15.0
snowballstemmer               2.0.0
sortedcontainers              2.2.2
Sphinx                        3.2.1
sphinxcontrib-applehelp       1.0.2
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        1.0.3
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.4
spyder                        4.1.4
spyder-kernels                1.9.4
testpath                      0.4.4
toml                          0.10.1
tornado                       6.0.4
traitlets                     5.0.4
typed-ast                     1.4.1
ujson                         3.2.0
urllib3                       1.25.10
watchdog                      0.10.3
wcwidth                       0.2.5
webencodings                  0.5.1
wheel                         0.35.1
wincertstore                  0.2
wrapt                         1.12.1
yapf                          0.30.0
zipp                          3.1.0

But I was unable to reproduce the error, although the change takes sometime (even the Preferences dialog has the (No response) for a bit). Also seems like the installation was done using WinPython.

Ok, thanks @dalthviz for your help. Closing because we were not able to reproduce it, sorry.

Please report this problem to the WinPython guys:

https://github.com/winpython/winpython

I understand. We're currently on 4.1.4, once 4.1.5 is out we'll move to
that to see if it helps.

Thanks for great tool.

Herbert Sauro

On Thu, Sep 10, 2020 at 2:40 PM Carlos Cordoba notifications@github.com
wrote:

Ok, thanks @dalthviz https://github.com/dalthviz for your help. Closing
because we were not able to reproduce it, sorry.

Please report this problem to the WinPython guys:

https://github.com/winpython/winpython

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/spyder-ide/spyder/issues/13748#issuecomment-690746325,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAIBSDVRRWCJMR7Q3TPO37TSFFBRBANCNFSM4RDCMRBA
.

--
Herbert Sauro, Professor
University of Washington, Bioengineering
206-685-2119, www.sys-bio.org
[email protected]
Books: http://books.analogmachine.org/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JesterEE picture JesterEE  Â·  3Comments

spyder-bot picture spyder-bot  Â·  3Comments

gabrielclow picture gabrielclow  Â·  3Comments

impact27 picture impact27  Â·  3Comments

hgijeon picture hgijeon  Â·  3Comments