Error requesting model from app engine url - it's not a zip file?

Hi.

I’'m deploying my chatbot to google cloud platform and the docker image builds but when the model is requested from the server it’s failing.

rasa.core.agent - Requesting model from server http://xxxxxxxxx.appspot.com/?hl=en-GB/models/default_core@latest

There are a couple of errors:

File “/usr/local/lib/python3.6/tarfile.py”, line 1576, in open raise ReadError(“file could not be opened successfully”) tarfile.ReadError: file could not be opened successfully

File “/usr/local/lib/python3.6/zipfile.py”, line 1198, in _RealGetContents raise BadZipFile(“File is not a zip file”) zipfile.BadZipFile: File is not a zip file

In my endpoints.yml i set the endpoints for the model as:

models: url: “http://xxxxxxxxx.appspot.com/?hl=en-GB/models/default_core@latest

And in the Dockerfile the command that runs rasa is:

ENTRYPOINT [ “rasa”, “run”, “-m”, “./models”, “-vv”, “–enable-api”, “–endpoints”, “endpoints.yml”, “–credentials”, “credentials.yml”, “-p”, “8080”]

Any advice would be great.

Thanks.

hi @Jmg007 - how have you set up the server that is providing the models? does it require any kind of authentication?

hi @amn41, build.txt (32.4 KB) i’ve attached the build logs when I run gcloud app deploy from the cloud shell sdk.

The error msg about 3/4 of the way down are:

2020-01-27 19:54:37 INFO     root  - Starting Rasa server on http://localhost:8080
2020-01-27 19:54:37 DEBUG    rasa.core.utils  - Using the default number of Sanic workers (1).
2020-01-27 19:54:37 INFO     root  - Enabling coroutine debugging. Loop id 94796527495608.
2020-01-27 19:54:37 DEBUG    rasa.model  - Extracted model to '/tmp/tmpq4hewp3_'.
2020-01-27 19:54:41.930821: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: UNKNOWN ERROR (303)
2020-01-27 19:54:42 DEBUG    rasa.core.tracker_store  - Connected to InMemoryTrackerStore.
2020-01-27 19:54:42 DEBUG    rasa.core.lock_store  - Connected to lock store 'InMemoryLockStore'.
2020-01-27 19:54:42 DEBUG    rasa.core.nlg.generator  - Instantiated NLG to 'TemplatedNaturalLanguageGenerator'.
2020-01-27 19:54:42 DEBUG    rasa.core.agent  - Requesting model from server http://xxxxxxxxxxx.appspot.com/?hl=en-GB/models/20200123-205743.tar.gz...
2020-01-27 19:54:42 ERROR    rasa.core.agent  - Could not load model due to File is not a zip file.
[2020-01-27 19:54:42 +0000] [1] [ERROR] Experienced exception while trying to serve

You might be right re: authentication as it is required with some google platforms APIs (Authentication at Google  |  Google Cloud) you need to set an environment variable eg. set GOOGLE_APPLICATION_CREDENTIALS=[PATH] so I will try that.

And I’ll try building the docker image locally and seeing if it works.

Thanks