From 31e10fdc1d62169134e61cc1ed576f10f2aded6b Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sat, 17 Jul 2021 18:29:42 +0800 Subject: [PATCH] raise ValueError instead of ctypes.ArgumentError ctypes.ArgumentError got imported through PyOpenGL import * --- pyqtgraph/opengl/items/GLTextItem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/opengl/items/GLTextItem.py b/pyqtgraph/opengl/items/GLTextItem.py index b1b1b6c0..1a79095a 100644 --- a/pyqtgraph/opengl/items/GLTextItem.py +++ b/pyqtgraph/opengl/items/GLTextItem.py @@ -39,7 +39,7 @@ class GLTextItem(GLGraphicsItem): args = ['pos', 'color', 'text', 'font'] for k in kwds.keys(): if k not in args: - raise ArgumentError('Invalid keyword argument: %s (allowed arguments are %s)' % (k, str(args))) + raise ValueError('Invalid keyword argument: %s (allowed arguments are %s)' % (k, str(args))) for arg in args: if arg in kwds: value = kwds[arg]