Skip to content

Commit 1890a0f

Browse files
Jammy2211Jammy2211
authored andcommitted
import exception on emcee
1 parent 38c94e4 commit 1890a0f

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

autofit/non_linear/paths/directory.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,14 @@ def load_search_internal(self):
210210

211211
# This is a nasty hack to load emcee backends. It will be removed once the source code is more stable.
212212

213-
import emcee
213+
try:
214+
import emcee
214215

215-
backend_filename = self.search_internal_path / "search_internal.hdf"
216-
if os.path.isfile(backend_filename):
217-
return emcee.backends.HDFBackend(filename=str(backend_filename))
216+
backend_filename = self.search_internal_path / "search_internal.hdf"
217+
if os.path.isfile(backend_filename):
218+
return emcee.backends.HDFBackend(filename=str(backend_filename))
219+
except ImportError:
220+
pass
218221

219222
filename = self.search_internal_path / "search_internal.dill"
220223

0 commit comments

Comments
 (0)