From 06057b3f03f5b8d9e007171582d7d31227e712d3 Mon Sep 17 00:00:00 2001 From: Andriy Babak Date: Tue, 24 Sep 2019 18:30:03 +0300 Subject: [PATCH] Fix the TypeError in Maya 2019, CentOS # TypeError: # 'PySide2.QtGui.QPixmap.grabWindow' called with wrong argument types: # PySide2.QtGui.QPixmap.grabWindow(int, int, int, int, int) # Supported signatures: PySide2.QtGui.QPixmap.grabWindow(quintptr, int = 0, int = 0, int = -1, int = -1) --- python/screen_grab/screen_grab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/screen_grab/screen_grab.py b/python/screen_grab/screen_grab.py index 2d845181..b125aa82 100644 --- a/python/screen_grab/screen_grab.py +++ b/python/screen_grab/screen_grab.py @@ -322,7 +322,7 @@ def get_desktop_pixmap(rect): :rtype: :class:`~PySide.QtGui.QPixmap` """ desktop = QtGui.QApplication.desktop() - return QtGui.QPixmap.grabWindow(desktop.winId(), rect.x(), rect.y(), + return QtGui.QPixmap.grabWindow(long(desktop.winId()), rect.x(), rect.y(), rect.width(), rect.height())