Setting Backend to Automatic Fails to Plot - Fedora 33
Opened this issue ยท 6 comments
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
(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
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?
- Set the backend to automatic.
- Run the simple plotting script
- 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)
Apologies, forgot to inclde the script
import numpy as np
import matplotlib.pyplot as plt
X = np.linspace(-np.pi, np.pi, 256, endpoint=True)
C, S = np.cos(X), np.sin(X)
plt.plot(X, C)
plt.plot(X, S)
plt.show()
Hi @Shadmeister,
Trying to reproduce your error I found another one. As soon as we fix the first one, I'll try to reproduce this one.
I think this bug is legit. We'll try to address it in a future version.
Have raised with redhat bug list - will update that report.
https://bugzilla.redhat.com/show_bug.cgi?id=1945943
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
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`
Sorry, I closed this one by mistake.