Problem deploying app using gcloud app engine

This is my error when I ran gcloud app deploy:

Traceback (most recent call last):
File “app/server.py”, line 37, in
learn = loop.run_until_complete(asyncio.gather(*tasks))[0]
File “/usr/local/lib/python3.6/asyncio/base_events.py”, line 484, in run_until_complete
return future.result()
File “app/server.py”, line 32, in setup_learner
learn.load(model_file_name)
File “/usr/local/lib/python3.6/site-packages/fastai/basic_train.py”, line 267, in load
state = torch.load(source, map_location=device)
File “/usr/local/lib/python3.6/site-packages/torch/serialization.py”, line 387, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File “/usr/local/lib/python3.6/site-packages/torch/serialization.py”, line 564, in _load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, ‘<’.
The command ‘/bin/sh -c python app/server.py’ returned a non-zero code: 1
ERROR

Used this: https://github.com/pankymathur/google-app-engine

1 Like

I get the same error message when deploying. Any help appreciated!

Hi Olli,

Am on the same boat, you can refer:


It has more details that you can try, if not already.

Hope it might work for you!!

If it does, please share steps :slight_smile:

Regards,

Amit

Hi Amit,

thanks. I tried these, and also increased the ‘app_start_timeout_sec’ to the max (3600), still got the timeout error.

Deployed the same model on Render and it works like a charm, first try. Would still be interested what is wrong in the gcloud.

Olli

1 Like

For me at least it turned out to be a disk space issue, solved by increasing the requested disk space in the app.yaml file, like this:

resources:
disk_size_gb: 12

12 GB seems to do the trick.