-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Error saving file (Qt5 backend) #3603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
IIRC, this was fixed shortly after 1.4.0 and we are putting out a bugfix On Wed, Oct 1, 2014 at 4:37 PM, skraelings notifications@github.com wrote:
|
Great! Didn't look hard enough to see if this was already reported. |
OS: Archlinux
Python: 2.7.8
PyQt bindings: 5.3.2-1
Qt: 5.3.2-1
Matplotlib: 1.4.0-2
Steps to reproduce:
from matplotlib import pyplot as plt
y_data = [....]
plt.plot(y_data, 'k+')
plt.show()
then press the "Save the figure" icon, it shows the dialog to write a filename. Then press Save, a model error window will pop-up complaining that "png)')" is not a supporte file extension.
Digging further in matplotlib/backend_bases.py (~2098) tries to resolve the extension by
but filename is this unicode:
u"(u'/home/rbm/figure_1.png', u'Portable Network Graphics (*.png)')"
This in turn comes from the qt5 backend filters passed in method save_fig of matplotlib/backends/backend_qt5.py :
Encapsulated Postscript (.eps);;Joint Photographic Experts Group (.jpeg .jpg);;PGF code for LaTeX (.pgf);;Portable Document Format (.pdf);;Portable Network Graphics (.png);;Postscript (.ps);;Raw RGBA bitmap (.raw .rgba);;Scalable Vector Graphics (.svg .svgz);;Tagged Image File Format (.tif *.tiff)
This will fail for every other format whatever choosed in the Save File dialog.
I tested the GTK backend and it doesn't have this problem.
The text was updated successfully, but these errors were encountered: