Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

backend_qt5 (1.4.0): Not saving the figure with NavigationToolbar (solved) #3454

Copy link
Copy link
Closed
@getzze

Description

@getzze
Issue body actions

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.