From 6a4e0a106f83bed0856cd7aa7732b43be099f5c9 Mon Sep 17 00:00:00 2001 From: ksunden Date: Mon, 27 May 2019 16:49:08 -0500 Subject: [PATCH] Add condition for namespace packages --- pyqtgraph/reload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/reload.py b/pyqtgraph/reload.py index 766ec9d0..f6c630b9 100644 --- a/pyqtgraph/reload.py +++ b/pyqtgraph/reload.py @@ -47,7 +47,7 @@ def reloadAll(prefix=None, debug=False): continue ## Ignore if the file name does not start with prefix - if not hasattr(mod, '__file__') or os.path.splitext(mod.__file__)[1] not in ['.py', '.pyc']: + if not hasattr(mod, '__file__') or mod.__file__ is None or os.path.splitext(mod.__file__)[1] not in ['.py', '.pyc']: continue if prefix is not None and mod.__file__[:len(prefix)] != prefix: continue