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
Related
i get this error when i import alexa. help me with this problem
No module named 'alexa'
'No module named 'alexa''
Traceback (most recent call last):
File "dga_detection.py", line 15, in
import alexa
ModuleNotFoundError: No module named 'alexa'
I'm using eclipse with PyDev, Python 2.7, and have the following problem.
From a package, containing .py and c modules, i have imported the .py modules, but not the C source files.
I have imported the C Function module (.py!) from the sg package, which includes the following line:
try:
import sg._cfunc as _cfunc
except ImportError:
import pyximport
pyximport.install(setup_args={"include_dirs": np.get_include()},
reload_support=True)
import sg._cfunc as _cfunc
ImportError: No module named _cfunc
However the C Source file is in .../site-packages/sg.
Moreover, this function was working beforehand, and is still working on an other computer.
I have already reinstalled Cython, but nothing happened.
Any idea? :(
I get the error ImportError: No module named httplib2 when I import httplib2. I have the latest version of App Engine launcher (1.8.0.802) and I'm able see the lib folder with all files under /GoogleappEngineLauncher.app/..../lib/httplib2/httplib2
Eclipse is able to find it and import the with no problem but when I run my app I get the error.
ERROR 2013-06-09 06:15:28,554 wsgi.py:219]
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 196, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 255, in _LoadHandler
handler = __import__(path[0])
File "/Users/user1791567/Documents/git/workspace/MyApp/test.py", line 7, in <module>
import httplib2
ImportError: No module named httplib2
Same occurs with a do: from apiclient import discovery which is in the folder google-api-python-client
Not sure what I'm doing wrong
Help is appreciated!!
httplib2 is not part of python or core third partly libraries supplied by the appengine runtime - see https://developers.google.com/appengine/docs/python/tools/libraries27
You need include or link the httplib2 code directly in your project and deploy it with your project.
I'm using PyCharm 2.6.3 and Python 2.7.5 for my Google Application Engine project.
Today occurred strange error when I was trying to debug my GAE project:
ImportError: No module named pydevd_vm_type
Module exists but doesn't want to be imported somewhere in debug tools.
When I trying to type "import pydevd_vm_type", autocomplete tool gives me right path to that module. How can I solve this issue?
Problem solved!
File Path_on_disk\PyCharm 2.6.3\helpers\pydev\pydevd.py
Error occurs in class
class PyDBCommandThread(PyDBDaemonThread)
in method
def OnRun(self)
...
import pydevd_vm_type
if pydevd_vm_type.GetVmType() == pydevd_vm_type.PydevdVmType.JYTHON and sys.hexversion <= 0x020201f0:
# a lot of comments about Jython bug
run_traced = False
and next in
import pydevd_tracing
if run_traced:
pydevd_tracing.SetTrace(None) # no debugging on this thread
I've deleted those two imports. PROFIT!!!
I'm trying to move my App Engine application to the Python 2.7 runtime.
I'm seeing the traceback below when importing the google.appengine.ext.deferred library using SDK version 1.6.5. I have also tried uploading the application and see a similar error in runtime.
Does anyone else use the deferred library with Python 2.7. Has anyone seen a similar problem?
EDIT
To answer my own question. My application had its own version of webapp2 (maybe an old version) removing this and adding webapp2 to the libraries section of app.yaml fixed the problem. Although, I'm not quite sure why as the traceback seems to show the deferred library importing the correct version of webapp.
Traceback:
...
File ".../units/unitsSchema/styleModel.py", line 30, in <module>
from google.appengine.ext import deferred
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/deferred/__init__.py", line 29, in <module>
from deferred import *
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/deferred/deferred.py", line 266, in <module>
class TaskHandler(webapp.RequestHandler):
AttributeError: 'module' object has no attribute 'RequestHandler'
It looks like you have a custom webapp.py in your python class path which is shadowing the correct webapp.py .
I'm currently using the deferred library with the new Python 2.7 runtime without problem.
I've enabled it in the builtins section of my app.yaml:
builtins:
- deferred: on
I've encountered the same issue. I've tried lots of methods.
Finally, I solved it. It is the webapp2 version problem.
There are a webapp2 library in the app.yaml file. Only use this one.
Do Not import the webapp2 from the deps.