0

I am trying to integrate dialog flow lib with my application which is deployed on google app engine standard environment. Though I have installed Google core API dependency I get following error :

ImportError: No module named google.api_core

On digging about this issue, the answer which I can find is it doesn't work on a standard environment because of sandboxing. I am stuck at this, any help is appreciated.

File "dialogflow/__init__.py", line 17,
in <module> from dialogflow_v2 import AgentsClient File "dialogflow_v2/__init__.py", line 19,
in <module> from dialogflow_v2 import types File "dialogflow_v2/types.py", line 20,
in <module> from google.api_core.protobuf_helpers import get_messages File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime/sandbox.py", line 1154,
in load_module raise ImportError('No module named %s' % fullname)
ImportError: No module named google.api_core
  • Can you show the full traceback? – Dan Cornilescu Jul 04 '19 at 03:38
  • @DanCornilescu : File "dialogflow/__init__.py", line 17, in from dialogflow_v2 import AgentsClient File "dialogflow_v2/__init__.py", line 19, in from dialogflow_v2 import types File "dialogflow_v2/types.py", line 20, in from google.api_core.protobuf_helpers import get_messages File "/usr/lib/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime/sandbox.py", line 1154, in load_module raise ImportError('No module named %s' % fullname) ImportError: No module named google.api_core – user1841083 Jul 04 '19 at 05:07
  • Please don't add code/traceback in comments, it's unreadable. Instead edit your post, add it there and format as code. – Dan Cornilescu Jul 04 '19 at 10:55
  • It doesn't look like a sandbox issue to me, but rather just a plain missing dependency. The `api_core` module appears to be part of the [google-cloud-python](https://github.com/googleapis/google-cloud-python) lib, check if it's installed. Also note the difference in specifying dependencies between the 1st and 2nd generation standard environment (see https://stackoverflow.com/a/56160440/4495081). – Dan Cornilescu Jul 09 '19 at 04:06

0 Answers0