From 00e9ff93a0ffa21f583e258cd071fec00ae4f0a8 Mon Sep 17 00:00:00 2001 From: Erik Clarke Date: Wed, 10 Oct 2018 17:16:28 -0400 Subject: [PATCH] change return type to str, not Path the `keras.load_model` function requires a string and this function returns a Path object. I've altered it to return a string, which is what downstream functions seem to expect anyway. This should address issue #9, hopefully. --- deepbinner/deepbinner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deepbinner/deepbinner.py b/deepbinner/deepbinner.py index 80f566c..400a7ff 100644 --- a/deepbinner/deepbinner.py +++ b/deepbinner/deepbinner.py @@ -330,13 +330,13 @@ def find_model(model_name): try: start_model = pathlib.Path(__file__).parents[1] / 'models' / model_name if start_model.is_file(): - return start_model + return str(start_model) except IndexError: pass try: start_model = pathlib.Path(__file__).parents[0] / 'models' / model_name if start_model.is_file(): - return start_model + return str(start_model) except IndexError: pass sys.exit('Error: could not find {} - did Deepbinner install correctly?'.format(model_name))