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

Commit f3f85ed

Browse filesBrowse files
committed
Ignore errors for sip with no setapi.
Apparently, this happens (see #20040 and related issues) sporadically. We don't care if we can't change the sip API version (if it's already been set), so also stop caring if the `setapi` function doesn't exist. This should simply cause the Qt4 backend to fail correctly later with an `ImportError` instead, and thus fall back to the next backend candidate. Fixes #20040.
1 parent 679ca17 commit f3f85ed
Copy full SHA for f3f85ed

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎lib/matplotlib/backends/qt_compat.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/qt_compat.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def _setup_pyqt4_internal(api):
117117
for _sip_api in _sip_apis:
118118
try:
119119
sip.setapi(_sip_api, api)
120-
except ValueError:
120+
except (AttributeError, ValueError):
121121
pass
122122
from PyQt4 import QtCore, QtGui
123123
import sip # Always succeeds *after* importing PyQt4.

0 commit comments

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