Error Deploying on Google App Engine

I’m trying to follow the “Deploying on Google App Engine” guide, but when I do “gcloud app deploy”, I’m getting this error. Any idea what could be going on? Thanks in advance! :slight_smile:

Step 7/9 : RUN python app/server.py
 ---> Running in e07fcc55fbdb
Traceback (most recent call last):
  File "app/server.py", line 37, in <module>
    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 30, in setup_learner
    tfms=get_transforms(), size=224).normalize(imagenet_stats)
  File "/usr/local/lib/python3.6/site-packages/fastai/vision/data.py", line 165, in single_from_classes
    return sd.label_const(0, label_cls=CategoryList, classes=classes).transform(ds_tfms, **kwargs).databunch()
TypeError: transform() got multiple values for argument 'tfms'
The command '/bin/sh -c python app/server.py' returned a non-zero code: 1
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: exit status 1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
ERROR: (gcloud.app.deploy) Cloud build failed. Check logs at https://console.cloud.google.com/gcr/builds/2b9f958b-4ea9-414a-8294-621fbed31e8f?project=959127849283 Failure status: UNKNOWN: Error Resp
onse: [2] Build failed; check build logs for details
2 Likes

So, I managed to solve the above problem by following the instructions here. Now I’m able to deploy the app, but it doesn’t seem to be doing anything… it just says “analyzing” forever. Any idea how I can debug what’s going on?

https://fastai-test-app-01.appspot.com/

So, I solved the above problem as well by following instructions here. Everything seems to be working fine now, but it might be worthwhile to update the guide to avoid others running into these same issues.

1 Like

Yeah the default notebooks definitely need to be updated. Thanks for the post!

I am getting a peculiar error after running the following code:

wget https://github.com/fastai/course-v3/raw/master/docs/production/google-app-engine.zip

The error code is as follows:

SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc
–2019-04-10 05:48:09-- https://github.com/fastai/course-v3/raw/master/docs/production/google-app-engine.zip
Resolving github.com… 192.30.253.112, 192.30.253.113
Connecting to github.com|192.30.253.112|:443… connected.
OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Unable to establish SSL connection.

Can anyone tell me what am I doing wrong?

Hi, I had the same issue after successfully deploy the app on GAE here https://bear-vision.appspot.com/, but when I test it out, it seems Analyzing… forever, do you have any clue please?

thank you

In server.py, changing the return value of def analyze to JSONResponse({'result': learn.predict(img)[0].obj}) fixed this issue for me. I had to deploy it locally first to figure out that this was the issue though.

1 Like

I tried with JSONResponse({‘result’: learn.predict(img)[0].obj}) or JSONResponse({‘result’: str(learn.predict(img)[0])}), neither are working for me.

Do I need to restart App Engine? I don’t seem to be able to find a place to restart it since it’s serverless. Anyone got some pointers?