Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading pre trained model failed #20

Open
ferasodh opened this issue Mar 23, 2021 · 0 comments
Open

Loading pre trained model failed #20

ferasodh opened this issue Mar 23, 2021 · 0 comments

Comments

@ferasodh
Copy link

ferasodh commented Mar 23, 2021

Any ideas how to fix the following error:

Loading pre-trained model [2021-03-23 22:02:15,651] ERROR in app: Exception on /analyze [POST] Traceback (most recent call last): File "/home/user/anaconda3/envs/brainy/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/home/user/anaconda3/envs/brainy/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/user/anaconda3/envs/brainy/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/user/anaconda3/envs/brainy/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/home/user/anaconda3/envs/brainy/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/user/anaconda3/envs/brainy/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/feras/Medical-Imaging/Brainy/app/routes.py", line 110, in analyze out_file = make_gif(file) File "/home/feras/Medical-Imaging/Brainy/app/utils.py", line 119, in make_gif model = load_old_model(app.config['MODEL']) File "/home/feras/Medical-Imaging/Brainy/app/utils.py", line 99, in load_old_model return load_model(model_file, custom_objects=custom_objects) File "/home/user/anaconda3/envs/brainy/lib/python3.6/site-packages/keras/engine/saving.py", line 419, in load_model model = _deserialize_model(f, custom_objects, compile) File "/home/user/anaconda3/envs/brainy/lib/python3.6/site-packages/keras/engine/saving.py", line 224, in _deserialize_model model_config = json.loads(model_config.decode('utf-8')) AttributeError: 'str' object has no attribute 'decode'
Thanks
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant