Running the basic Google App - google-app-engine

I am trying to run the basic google app in my localhost. But I seem to have some error which i am not able to solve:
Error when i typed: dev_appserver.py /Users/GoogleApp/helloworld
Traceback (most recent call last):
File "/usr/local/bin/dev_appserver.py", line 133, in <module>
run_file(__file__, globals())
File "/usr/local/bin/dev_appserver.py", line 129, in run_file
execfile(script_path, globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 694, in <module>
sys.exit(main(sys.argv))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 582, in main
root_path, {}, default_partition=default_partition)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 3217, in LoadAppConfig
raise AppConfigNotFoundError
google.appengine.tools.dev_appserver.AppConfigNotFoundError
Not able to solve it..

Yo need to have an app.yaml file in you application directory (in your case /Users/GoogleApp/helloworld). See the docs for details. Refer to the Getting Started Guide (section Creating the Configuration File) for more examples.

Keep the helloworld subdirectory outside the sdk directory, eg:
/home/helloworld

Related

Google App Engine Deploy AttributeError expat_CAPI

I have been using Google App Engine Launcher many times and it worked perfect but recently I used it and I had this Error:
2014-01-02 18:50:58 Running command: "[u'C:\\Python27\\python.exe', '-u', u'C:\\Program Files (x86)\\Google\\google_appengine\\appcfg.py', '--no_cookies', u'--email=[my email]', '--passin', 'update', u'D:\\temp\\my-aiesec']"
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 196, in <module>
run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 192, in run_file
execfile(script_path, globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 81, in <module>
from google.appengine.tools import bulkloader
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\bulkloader.py", line 128, in <module>
from google.appengine.ext.bulkload import bulkloader_config
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\bulkload\bulkloader_config.py", line 47, in <module>
from google.appengine.ext.bulkload import simplexml_connector
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\bulkload\simplexml_connector.py", line 40, in <module>
from xml.etree import cElementTree as ElementTree
File "C:\Python27\Lib\xml\etree\cElementTree.py", line 3, in <module>
from _elementtree import *
AttributeError: 'module' object has no attribute 'expat_CAPI'
2014-01-02 18:50:59 (Process exited with code 1)
You can close this window now.
1- First I thought the version of my GAE is out dated. so I upgrade to newest version 1.8.8.
2- I set the python 2.7 path in preferences.
3- I created a new project and launched it locally and it worked.
But still I had this deploying problem.
Previously I defined PYTHONPATH in the Environment Variables (System Variables) of my windows. I removed that Variable and Google App Engine worked again.

cannot run helloworld in Google app engine launcher

Google App Engine Launcher suddenly not working when running any app, it works well yesterday.
Error produced:
wi2013-01-15 14:56:52 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--admin_console_server=', '--port=8080', 'C:\\Users\\Lawrence\\Documents\\guestbook-2']"
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 171, in <module>
run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 167, in run_file
execfile(script_path, globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 166, in <module>
from google.appengine.tools import appcfg
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 41, in <module>
import mimetypes
File "C:\Python27\Lib\mimetypes.py", line 29, in <module>
import urllib
File "C:\Python27\Lib\urllib.py", line 26, in <module>
import socket
File "C:\Python27\Lib\socket.py", line 47, in <module>
import _socket
ImportError: Module use of python25.dll conflict with this version of Python.
2013-01-15 14:56:52 (Process exited with code 1)
When you google this error, a lot of solution telling you to change the
System/ User Environment Variable to add C:\Python27;C:\Python27\Scripts; C:\Python27\Lib; C:\Python27\libs; etc, remove or add User Variable etc. All those trick not work for me.
I didn't install python25. Those programme refer to it and using import _socket are google app engine launcher itself or Google Drive, I have stopped my Google Drive already as people found this may cause problem. so I guess this GAE conflicted itself when some error happen inside it. The clue is I got another error in google app launcher log,C:\Program Files (x86)\Google\google_appengine\launcher\GoogleAppEngineLauncher.exe.log
I'm using win 7 64 bits, GAE 1.7.4, Python 2.7.3
You need to edit app.yaml
you should have:
runtime: python
replace with:
runtime: python27
threadsafe: true
Pay attention to threadsafe:
https://developers.google.com/appengine/docs/python/python25/migrate27#threadsafe
Other setting of app.yaml
https://developers.google.com/appengine/docs/python/config/appconfig#Required_Elements
If you start from Python 2.5 please read:
https:// developers.google.com/appengine/docs/python/python25/migrate27#appyaml

AppConfigNotFoundError for dev_appserver.py on Django-nonrel and Google App Engine

I'm trying to clear my local db like explained in the docs
But when I try and run the dev_appserver.py --clear_datastore command I get google.appengine.tools.dev_appserver.AppConfigNotFoundError
dev_appserver.py --clear_datastore dennys
Traceback (most recent call last):
File "/usr/local/bin/dev_appserver.py", line 76, in <module>
run_file(__file__, globals())
File "/usr/local/bin/dev_appserver.py", line 72, in run_file
execfile(script_path, globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 687, in <module>
sys.exit(main(sys.argv))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 575, in main
appinfo, matcher = dev_appserver.LoadAppConfig(root_path, {})
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 4359, in LoadAppConfig
raise AppConfigNotFoundError
google.appengine.tools.dev_appserver.AppConfigNotFoundError
You have to specify the directory of your application in the command line to dev_appserver.py.
I solved this problem by going to:
Run --> Debug Configurations --> (right click) PyDev Google App Run --> New
Type the project name under "Project".
Then click on "Arguments" and put the path location of where your app.yaml file is. The picture below describes what I'm talking about:
You are missing the boolean yes value as stated in the docs:
dev_appserver.py --clear_datastore=yes myapp

importing app engine sample in eclipse

Downloaded GAE sample code and copied into Eclipse pydev explorer
and got following errors on execution
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 67, in <module>
run_file(__file__, globals())
File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 63, in run_file
execfile(script_path, globals_)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 417, in <module>
sys.exit(main(sys.argv))
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 360, in main
config, matcher = dev_appserver.LoadAppConfig(root_path, {})
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3441, in LoadAppConfig
raise AppConfigNotFoundError
google.appengine.tools.dev_appserver.AppConfigNotFoundError
This error occurs commonly if you don't have app.yaml or dev_appserver didn't find it. Can you ensure that you ran dev_appserver . with the project directory being the working directory? Also, please include app.yaml in your question, if the file actually exists.

Appengine mercurial error

I am trying to deploy mercurial for google app engine and keep getting this error. Please see if anyone has a solution.
<type 'exceptions.ImportError'>: No module named pwd
Traceback (most recent call last):
File "/base/data/home/apps/ajatus-graphics/2.339364808142331297/hgapp.py", line 33, in <module>
main()
File "/base/data/home/apps/ajatus-graphics/2.339364808142331297/hgapp.py", line 23, in main
from dashboard import dashboard
File "/base/data/home/apps/ajatus-graphics/2.339364808142331297/dashboard.py", line 3, in <module>
from mercurial import templater, templatefilters, util
File "/base/python_dist/lib/python2.5/py_zipimport.py", line 242, in load_module
exec code in mod.__dict__
File "/base/data/home/apps/ajatus-graphics/2.339364808142331297/hg.zip/mercurial/templater.py", line 10, in <module>
File "/base/python_dist/lib/python2.5/py_zipimport.py", line 242, in load_module
exec code in mod.__dict__
File "/base/data/home/apps/ajatus-graphics/2.339364808142331297/hg.zip/mercurial/util.py", line 543, in <module>
File "/base/python_dist/lib/python2.5/py_zipimport.py", line 242, in load_module
exec code in mod.__dict__
File "/base/data/home/apps/ajatus-graphics/2.339364808142331297/hg.zip/mercurial/posix.py", line 10, in <module>
maybe one of these projects will be of use?
http://bitbucket.org/durin42/mercurial-appengine/overview
http://appgallery.appspot.com/about_app?app_id=agphcHBnYWxsZXJ5chQLEgxBcHBsaWNhdGlvbnMYne8BDA (see also https://www.mercurial-scm.org/pipermail/mercurial/2008-December/022692.html )
You can't access the unix password database in the App Engine sandbox, so the pwd module isn't installed.
In general, many random python modules will require extensive hacking to get them to run on App Engine.
The simplest way is remove import pwd. Because when you run on GAE, you don't need this module.

Resources