[matti@babylon appengine-server] 19:22:06 % /usr/local/bin/dev_appserver.py .
Traceback (most recent call last):
File "/usr/local/bin/dev_appserver.py", line 84, in <module>
_run_file(__file__, globals())
File "/usr/local/bin/dev_appserver.py", line 80, in _run_file
execfile(_PATHS.script_file(script_name), globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 31, in <module>
from google.appengine.api import appinfo
ImportError: No module named appengine.api--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/be728fb8-0c73-4f7d-9201-b0b692047049%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I have added two comments. Updated today to this version on OS X 10.11.4 and after updating the symlinks (in GoogleAppEngineLauncher menu), I could launch the app. Later I also launched from CLI (dev_appserver.py), but only after I was prompted to update a gcloud component
import google
print(google)
print(sys.path)It would be interesting to see what the results are if you throw in a few debug statements above line 31 in 'devappserver2.py':import google
print(google)
print(sys.path)
<module 'google' from '/usr/local/bin/google'>
['/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/antlr3', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/fancy_urllib', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/ipaddr', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/yaml-3.10', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/rsa', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/pyasn1', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/pyasn1_modules', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/httplib2', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/oauth2client', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/six', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/concurrent', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/cherrypy', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/portpicker', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/jinja2-2.6', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webob-1.2.3', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.5.1', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine', '/Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg', '/Users/matti/src/vision-api-poc/appengine-server', '/usr/local/google_appengine', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages']
Traceback (most recent call last):
File "/usr/local/bin/dev_appserver.py", line 84, in <module>
_run_file(__file__, globals())
File "/usr/local/bin/dev_appserver.py", line 80, in _run_file
execfile(_PATHS.script_file(script_name), globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 35, in <module>
from google.appengine.api import appinfo
ImportError: No module named appengine.api
# Set GOOGLE_APPLICATION_CREDENTIALS so that the service account key file
# can be found by the Google APIs, ie:
#
# export GOOGLE_APPLICATION_CREDENTIALS="/path/to/file.json"
if [ -z ${GOOGLE_APPLICATION_CREDENTIALS+x} ]; then
echo "You must set GOOGLE_APPLICATION_CREDENTIALS!";
exit 1
fi
/usr/local/bin/dev_appserver.py --host=0.0.0.0 .
It looks like you also have the 'google' package (Python bindings to the Google search engine) installed eg. via pip or homebrew, which will install a module in '/usr/local/bin/google', and it's getting imported instead of '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google'.As for why, something tells me it's related to this recently reported issue, in which it appears dev_appserver is changing the way the 'google' import is added to sys.modules. As a workaround, you can try uninstalling or renaming '/usr/local/bin/google' to something else and see if the problem goes away.
As for why, something tells me it's related to this recently reported issue, in which it appears dev_appserver is changing the way the 'google' import is added to sys.modules. As a workaround, you can try uninstalling or renaming '/usr/local/bin/google' to something else and see if the problem goes away.
Looking around using pdb, I was able to pinpoint the problem to a conflict with the python2-protobuf archlinux package providing a built-in google module that seem to upset the new code.