diff --git a/CHANGELOG.md b/CHANGELOG.md index 5172c40d8..476bdce98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ [#1583](https://github.com/NeurodataWithoutBorders/pynwb/pull/1583) - Update round trip tutorial to the newer ``NWBH5IOMixin`` and ``AcquisitionH5IOMixin`` classes. @bendichter [#1586](https://github.com/NeurodataWithoutBorders/pynwb/pull/1586) +- More informative error message for common installation error. @bendichter, @rly + [#1591](https://github.com/NeurodataWithoutBorders/pynwb/pull/1591) ## PyNWB 2.2.0 (October 19, 2022) diff --git a/src/pynwb/__init__.py b/src/pynwb/__init__.py index 6cf7d7656..d1f5cd0bc 100644 --- a/src/pynwb/__init__.py +++ b/src/pynwb/__init__.py @@ -101,10 +101,16 @@ def load_namespaces(**kwargs): return __TYPE_MAP.load_namespaces(namespace_path) -# load the core namespace i.e. base NWB specification +# load the core namespace, i.e. base NWB specification __resources = __get_resources() if os.path.exists(__resources['namespace_path']): load_namespaces(__resources['namespace_path']) +else: + raise RuntimeError( + "'core' is not a registered namespace. If you installed PyNWB locally using a git clone, you need to " + "use the --recurse_submodules flag when cloning. See developer installation instructions here: " + "https://pynwb.readthedocs.io/en/stable/install_developers.html#install-from-git-repository" + ) def available_namespaces():