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

Multiple issues deploying server app into AppEngine #105

Open
lukwam opened this issue Nov 3, 2017 · 3 comments
Open

Multiple issues deploying server app into AppEngine #105

lukwam opened this issue Nov 3, 2017 · 3 comments

Comments

@lukwam
Copy link
Collaborator

lukwam commented Nov 3, 2017

Trying to deploy the password-alert server into a new GCP Project and I'm running into some trouble.

The first issue I ran into was the app.yaml, which gcloud app deploy complained about, so I changed:

application: broad-password-alert
version: 1

to

# application: broad-password-alert
# version: 1

and then I was able to deploy the app.

Once it was deployed. I tried to access it and got the error:

ImportError: No module named apiclient.discovery

I tried to fix this by installing the gcloud-api-python-client into a newly created lib directory in the server directory like this:

mkdir lib/
pip install -t lib/ google-api-python-client

I also created an appengine_config.py with the following:

from google.appengine.ext import vendor

# Add any libraries install in the "lib" folder.
vendor.add('lib')

and then I redeployed the app with gcloud app deploy.

Then I ran into the issue:

ImportError: cannot import name appengine

At this point I'm wondering if there is an older version of google-api-python-client I should be using, or if there are newer docs that show how to deploy this successfully so I don't have to modify the code too much?

@KSchmeeds
Copy link

I'm having a similar issue. I tried importing the google-api-python-client as @lukwam suggested and creating the appengine_config.py, but am still getting this error:

Traceback (most recent call last):
File "/base/alloc/tmpfs/dynamic_runtimes/python27/54c5883f70296ec8_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/base/alloc/tmpfs/dynamic_runtimes/python27/54c5883f70296ec8_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/base/alloc/tmpfs/dynamic_runtimes/python27/54c5883f70296ec8_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = import(path[0])
File "/base/data/home/apps/sprojectidredacted/20171218t121153.406309468380228714/admin.py", line 23, in
import auth
File "/base/data/home/apps/s
projectidredacted/20171218t121153.406309468380228714/auth.py", line 23, in
import google_directory_service
File "/base/data/home/apps/s~projectidredacted/20171218t121153.406309468380228714/google_directory_service.py", line 19, in
from apiclient.discovery import build
ImportError: No module named apiclient.discovery

@KSchmeeds
Copy link

It appears to now be giving me a similar error as @lukwam

Traceback (most recent call last):
File "/base/alloc/tmpfs/dynamic_runtimes/python27/54c5883f70296ec8_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/base/alloc/tmpfs/dynamic_runtimes/python27/54c5883f70296ec8_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/base/alloc/tmpfs/dynamic_runtimes/python27/54c5883f70296ec8_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = import(path[0])
File "/base/data/home/apps/sprojectidredacted/20171218t135856.406311194676011588/admin.py", line 23, in
import auth
File "/base/data/home/apps/s
projectidredacted/20171218t135856.406311194676011588/auth.py", line 23, in
import google_directory_service
File "/base/data/home/apps/s~projectidredacted/20171218t135856.406311194676011588/google_directory_service.py", line 23, in
from oauth2client import appengine
ImportError: cannot import name appengine

@MrMosesG
Copy link

I ran into these same issues this week.

I got a functional version of the apiclient library by downloading and unzipping the prebuilt server files to deploy from, but I'm now getting http error 500 when trying to launch the admin app at https://.appspot.com.

Is this project just defunct now? It seems much of the code is out of date enough as to be unsupported.

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

3 participants