question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting Backend to Automatic Fails to Plot - Fedora 33

See original GitHub issue

Issue 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 (or pip, 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

In setting Tools -> Preferences -> IPython Console -> Graphics -> Backend -> Automatic, plots fail to materialise, and error in interpreter window

TKinter works, but for some reason, the text in plots is not scaling, and everything is large, crayon type drawing. GTK3 causes Spyder to hang. I have raised bug with RedHat bug support (https://bugzilla.redhat.com/show_bug.cgi?id=1945943) but no response. I have searched QT bug reports too, and nothing similar.

If anything, just need confirmation that the issue is Spyder, QT5, or other, so i know who i need to progress with. Thanks.

What steps reproduce the problem?

  1. Set the backend to automatic.
  2. Run the simple plotting script
  3. No plot window appears, and error in IPython window

What is the expected output? What do you see instead?

Output should be plot window, yet no plot window appears.

Paste Traceback/Error Below (if applicable)


Traceback (most recent call last):

  File "/home/richard/Documents/Math Python/Python For Finance/Ch1/untitled0.py", line 14, in <module>
    plt.plot(X, C)

  File "/usr/lib64/python3.9/site-packages/matplotlib/pyplot.py", line 2840, in plot
    return gca().plot(

  File "/usr/lib64/python3.9/site-packages/matplotlib/pyplot.py", line 2368, in gca
    return gcf().gca(**kwargs)

  File "/usr/lib64/python3.9/site-packages/matplotlib/pyplot.py", line 747, in gcf
    return figure()

  File "/usr/lib64/python3.9/site-packages/matplotlib/pyplot.py", line 687, in figure
    figManager = new_figure_manager(num, figsize=figsize,

  File "/usr/lib64/python3.9/site-packages/matplotlib/pyplot.py", line 315, in new_figure_manager
    return _backend_mod.new_figure_manager(*args, **kwargs)

  File "/usr/lib64/python3.9/site-packages/matplotlib/backend_bases.py", line 3494, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)

  File "/usr/lib64/python3.9/site-packages/matplotlib/backend_bases.py", line 3499, in new_figure_manager_given_figure
    canvas = cls.FigureCanvas(figure)

  File "/usr/lib64/python3.9/site-packages/matplotlib/backends/backend_qt5agg.py", line 21, in __init__
    super().__init__(figure=figure)

  File "/usr/lib64/python3.9/site-packages/matplotlib/backends/backend_qt5.py", line 219, in __init__
    _create_qApp()

  File "/usr/lib64/python3.9/site-packages/matplotlib/backends/backend_qt5.py", line 126, in _create_qApp
    qApp = QtWidgets.QApplication(["matplotlib"])

  File "/usr/lib/python3.9/site-packages/spyder_kernels/customize/spydercustomize.py", line 160, in __init__
    super(SpyderQApplication, self).__init__(*args, **kwargs)

TypeError: super(type, obj): obj must be an instance or subtype of type

Versions

  • Spyder version: 4.1.5 None
  • Python version: 3.9.2 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.0
  • Operating System: Linux 5.11.11-200.fc33.x86_64 Fedora 33

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    :  20200713 (OK)
intervaltree                   :  None (OK)
IPython >=4.0                  :  7.18.1 (OK)
jedi =0.17.1                   :  0.17.1 (OK)
keyring                        :  None (OK)
nbconvert >=4.0                :  5.6.1 (OK)
numpydoc >=0.6.0               :  0.9.2 (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.2 (OK)
pygments >=2.0                 :  2.6.1 (OK)
pylint >=1.0                   :  2.6.0 (OK)
pyls >=0.34.0;<1.0.0           :  0.34.1 (OK)
qdarkstyle >=2.8               :  2.8 (OK)
qtawesome >=0.5.7              :  0.7.3 (OK)
qtconsole >=4.6.0              :  4.7.7 (OK)
qtpy >=1.5.0                   :  1.9.0 (OK)
sphinx >=0.6.6                 :  3.2.1 (OK)
spyder_kernels >=1.9.4;<1.10.0 :  1.9.4 (OK)
watchdog                       :  None (OK)
xdg >=0.26                     :  0.26 (OK)
zmq >=17                       :  19.0.0 (OK)

# Optional:
cython >=0.21                  :  0.29.21 (OK)
matplotlib >=2.0.0             :  3.3.4 (OK)
numpy >=1.7                    :  1.19.4 (OK)
pandas >=0.13.1                :  1.0.5 (OK)
scipy >=0.17.0                 :  1.5.4 (OK)
sympy >=0.7.3                  :  1.7.1 (OK)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nikeshocks65commented, Jun 20, 2021

I am able to reproduce this issue in spyder 5.0.4 with more recent dependencies:

Version

  • Spyder version: 5.0.4 None
  • Python version: 3.9.5 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.0
  • Operating System: Linux 5.12.11-300.fc34.x86_64 (Fedora 34)

Dependencies

Mandatory:

atomicwrites >=1.2.0 : 1.4.0 (OK) chardet >=2.0.0 : 4.0.0 (OK) cloudpickle >=0.5.0 : 1.6.0 (OK) cookiecutter >=1.6.0 : 1.7.2 (OK) diff_match_patch >=20181111 : 20200713 (OK) intervaltree >=3.0.2 : 3.1.0 (OK) IPython >=7.6.0 : 7.20.0 (OK) jedi =0.17.2 : 0.17.2 (OK) jsonschema >=3.2.0 : 3.2.0 (OK) keyring >=17.0.0 : 22.0.1 (OK) nbconvert >=4.0 : 6.0.7 (OK) numpydoc >=0.6.0 : 1.1.0 (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.8.0 (OK) pygments >=2.0 : 2.7.4 (OK) pylint >=1.0 : 2.6.0 (OK) pyls >=0.36.2;<1.0.0 : 0.36.2 (OK) pyls_black >=0.4.6 : 0.4.6 (OK) pyls_spyder >=0.3.2;<0.4.0 : 0.3.2 (OK) qdarkstyle =3.0.2 : 3.0.2 (OK) qstylizer >=0.1.10 : 0.2.0 (OK) qtawesome >=1.0.2 : 1.0.2 (OK) qtconsole >=5.1.0 : 5.1.0 (OK) qtpy >=1.5.0 : 1.9.0 (OK) rtree >=0.9.7 : 0.9.7 (OK) setuptools >=39.0.0 : 53.0.0 (OK) sphinx >=0.6.6 : 3.4.3 (OK) spyder_kernels >=2.0.4;<2.1.0 : 2.0.4 (OK) textdistance >=4.2.0 : 4.2.1 (OK) three_merge >=0.1.1 : 0.1.1 (OK) watchdog >=0.10.3 : 1.0.2 (OK) xdg >=0.26 : 0.27 (OK) zmq >=17 : 22.0.3 (OK)

Optional:

cython >=0.21 : 0.29.21 (OK) matplotlib >=2.0.0 : 3.4.2 (OK) numpy >=1.7 : 1.20.1 (OK) pandas >=1.1.1 : 1.2.1 (OK) scipy >=0.17.0 : 1.6.2 (OK) sympy >=0.7.3 : 1.8 (OK)

Traceback: ` File “/home/cole/Documents/untitled2.py”, line 14, in <module> plt.plot(X, C)

File “/usr/lib64/python3.9/site-packages/matplotlib/pyplot.py”, line 3019, in plot return gca().plot(

File “/usr/lib64/python3.9/site-packages/matplotlib/pyplot.py”, line 2532, in gca return gcf().gca(**kwargs)

File “/usr/lib64/python3.9/site-packages/matplotlib/pyplot.py”, line 854, in gcf return figure()

File “/usr/lib64/python3.9/site-packages/matplotlib/pyplot.py”, line 797, in figure manager = new_figure_manager(

File “/usr/lib64/python3.9/site-packages/matplotlib/pyplot.py”, line 316, in new_figure_manager return _backend_mod.new_figure_manager(*args, **kwargs)

File “/usr/lib64/python3.9/site-packages/matplotlib/backend_bases.py”, line 3545, in new_figure_manager return cls.new_figure_manager_given_figure(num, fig)

File “/usr/lib64/python3.9/site-packages/matplotlib/backend_bases.py”, line 3550, in new_figure_manager_given_figure canvas = cls.FigureCanvas(figure)

File “/usr/lib64/python3.9/site-packages/matplotlib/backends/backend_qt5agg.py”, line 21, in init super().init(figure=figure)

File “/usr/lib64/python3.9/site-packages/matplotlib/backends/backend_qt5.py”, line 213, in init _create_qApp()

File “/usr/lib64/python3.9/site-packages/matplotlib/backends/backend_qt5.py”, line 119, in _create_qApp qApp = QtWidgets.QApplication([“matplotlib”])

File “/usr/local/lib/python3.9/site-packages/spyder_kernels/customize/spydercustomize.py”, line 163, in init super(SpyderQApplication, self).init(*args, **kwargs)

TypeError: super(type, obj): obj must be an instance or subtype of type`

1reaction
ccordoba12commented, Apr 22, 2021

I think this bug is legit. We’ll try to address it in a future version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spyder 4, QT5 and Automatic Backend Failing - Fedora Forum
Hi, I raised a bug with the redhat bugzilla, but this is low priority. I have installed Spyder 4 and accompanying this is...
Read more >
How to debug printing problems - Fedora Project Wiki
We need to define two different ways of capturing incident-bound CUPS whole logs - the one if the broken print queue isn't provided...
Read more >
How can I set the 'backend' in matplotlib in Python?
I tried to use other argument of backend like 'GTK' and 'TkAgg'. I installed python-gtk2-dev package, but still the error is below. Can...
Read more >
1502871 – Spyder - No module named 'matplotlib.backends ...
If it's set to automatic, I get a similar error. ... this is a problem with Fedora setting a default backend in its...
Read more >
Automatic graphics backend throws an error #5541 - GitHub
The Automatic option always fallback to Qt (4 or 5) because you need one of those to run Spyder. I didn't know that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found