Skip to content

Commit

Permalink
change return type to str, not Path
Browse files Browse the repository at this point in the history
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 rrwick#9, hopefully.
  • Loading branch information
eclarke authored Oct 10, 2018
1 parent 8343dd7 commit 00e9ff9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepbinner/deepbinner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

2 comments on commit 00e9ff9

@kjestradag
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, it seems that it works :).

thank you !!

@bazante1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tnx,
Worked for me!

Please sign in to comment.