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

Getting Error "The command '/bin/sh -c python app/server.py' returned a non-zero code: 1" #552

Open
BlockchainRev opened this issue Jul 23, 2020 · 2 comments

Comments

@BlockchainRev
Copy link

I don't really know if this is the right place to post this but here goes.

I'm trying to run one of my fastai created models (the google images based one) on Docker (not Kubernetes) and locally on my MacBook Pro Mid 2012 with MacOS Mojave. Link to model is here: github.com/blockchainrev/beanfinder

It reaches the sixth step and breaks with this:

Traceback (most recent call last): File "app/server.py", line 48, in <module> learn = loop.run_until_complete(asyncio.gather(*tasks))[0] File "/usr/local/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete return future.result() File "app/server.py", line 35, in setup_learner learn = load_learner(path, export_file_name) File "/usr/local/lib/python3.7/site-packages/fastai/basic_train.py", line 598, in load_learner state = torch.load(source, map_location='cpu') if defaults.device == torch.device('cpu') else torch.load(source) File "/usr/local/lib/python3.7/site-packages/torch/serialization.py", line 387, in load return _load(f, map_location, pickle_module, **pickle_load_args) File "/usr/local/lib/python3.7/site-packages/torch/serialization.py", line 564, in _load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, '\x0a'. The command '/bin/sh -c python app/server.py' returned a non-zero code: 1

Thanks!

@ghost
Copy link

ghost commented Jul 30, 2020

My server.py is failing as well, and I am getting the exact same error as above. Tried deploying on Render, local Docker build, AWS. Definitely appears to be a problem with the server.py file.

@ghost
Copy link

ghost commented Aug 1, 2020

@BlockchainRev check out my post on the fastai forums to see how I got it working.

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