2

python version 2.7.9

installed version 1.5.1

pip install --upgrade google-api-python-client

from here trying to import task queue like so

from google.appengine.api import taskqueue

getting

ImportError: No module named google.appengine.api

1.5.1 is the latest version, and I can't seem to find any code reference to task queue in the pip code here

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
WebQube
  • 8,510
  • 12
  • 51
  • 93

3 Answers3

0

The Google Cloud SDK - Release Notes tracks the version of the GAE components, search for the App Engine components updated to pattern.

The version of the most recent GAE components in the current Cloud SDK version (120.0.0) is 1.9.38 (emphasis mine):

Google App Engine

...

  • Google App Engine components updated to 1.9.38.

The 1.9.38 version is affected by a bug causing import errors, see "ImportError: No module named webapp2" after Linux SDK upgrade (1.9.35 -> 1.9.38)

I see 2 options for you:

  • downgrade to a Cloud SDK version prior to 109.0.0 (in which the affected GAE version 1.9.37 was introduced)

  • if you only use GAE and not other Cloud products for which you need the Cloud SDK switch to the GAE SDK (current version 1.9.40 in which the issue is fixed), see the comments to this Q&A: What is the relationship between Google's App Engine SDK and Cloud SDK?

Community
  • 1
  • 1
Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
  • downgraded to 108.0.0 . `gcloud components update --version 108.0.0 Your current Cloud SDK version is: 109.0.0 You will be upgraded to version: 108.0.0` . still the same error – WebQube Aug 09 '16 at 14:45
0

I have downloaded the sdk from here https://cloud.google.com/appengine/downloads

after downloaded added it to my project source files .

and added the path to the home directory in my python code like so

import os, sys

test_directory = os.path.dirname(os.path.abspath(__file__))
paths = [
    '/../../google_appengine',
]

for path in paths:
    sys.path.insert(0, os.path.abspath(test_directory + path))
WebQube
  • 8,510
  • 12
  • 51
  • 93
0

Hi I think this question is still open and instead of the above I might try from google.appengine.api.taskqueue import taskqueue I looked at the source and a few other docs and I see the same pattern used in the Class

devocide
  • 61
  • 2