Description
Bug also reported here: https://bugs.archlinux.org/task/41790
When clicking on the Save button on the NavigationToolbar, I get an error:
Format "png)')" is not supported. Supported formats: eps, jpeg, jpg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff.
I tracked the bug to be coming from the output of the _getSaveFileName
function, that is supposed to be a string but is a tuple in reality. In qt_compat.py
, _getSaveFileName
links to QtWidgets.QtFileDialog.getSaveFileName.
In pyqt4, this function returns a string, but the doc pyqt4/5 differences says that in pyqt5 the functions returns a tuple (filename, extension), as for getSaveFileNameAndFilter
in pyqt4.
Commenting line 96 in qt_compat.py
solved the problem, because _getSaveFileName
is then correctly defined in line 117 (only returning the first element of the tuple).