Tuesday, April 8, 2008

Google AppEngine

New Google AppEngine!

Sweet, couldn't wait to use it. I started the tutorial during lunch. I downloaded and installed Python and the AppEngine. Then I created a work directory, "C:\google_workspace" and a helloworld folder, "C:\google_workspace\helloworld" just like the tutorial said to do, created the files "helloworld.py" and "app.yaml" just like in the tutorial, and fired up the dev_appserver with, "C:\google_workspace\helloworld>dev_appserver.py helloworld\". Instead of "Hello, world!" I got :

C:\google_workspace\helloworld>dev_appserver.py helloworld/
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 50, in
<module>
execfile(script_path, globals())
File "C:\Program Files\Google\google_appengine\google/appengine/tools/dev_apps
erver_main.py", line 338, in <module>
sys.exit(main(sys.argv))
File "C:\Program Files\Google\google_appengine\google/appengine/tools/dev_apps
erver_main.py", line 287, in main
config, matcher = dev_appserver.LoadAppConfig(root_path, {})
File "C:\Program Files\Google\google_appengine\google\appengine\tools\dev_apps
erver.py", line 2415, in LoadAppConfig
raise AppConfigNotFoundError
google.appengine.tools.dev_appserver.AppConfigNotFoundError

Hmm. I ran through a mental checklist before diving into the code (I knew I was being lazy. I was also really looking forward to diving into the code, but I wanted to at least get the thing running first.)
  • Perhaps I should've installed somewhere other than "C:\Program Files" I don't usually put anything in there.
  • Apparently I had Tomcat running which would be blocking 80 (I usually set Tomcat to 80 and JBoss to 8080).
Neither of those made a difference. "I, d, ten, t" error - I was running the wrong file.

Running, "C:\google_workspace\helloworld>dev_appserver.py ./" started the server.

The first line was a prompt, "Allow dev_appserver to check for updates on startup? (Y/n):"
Naturally I said "Y", and I liked name of the config file which was conveniently printed out on the next line, "dev_appserver will check for updates on startup. To change this setting, edit C
:\Documents and Settings\jdavis/.appcfg_nag"

I saw "Hello, world!"

I can't wait to start using this. Now I can finally build a completely scalable side project to make myself rich without spending any money out of pocket! Actually, I can finally stop putting off learning Python.
Blogged with the Flock Browser

1 comment:

Sabari Nathan said...

Hi Arrogant Programmer,
i tried ur solution. It worked exactly only once. I restarted the server it failed again. I have instaled my appengine at Windows XP.
Path for appengine
c:\google\google-appengine\helloworld
every time when i fire my server i m getting this error
C:\Google\google_appengine>dev_appserver.py --port=9999 helloworld
Traceback (most recent call last):
File "C:\Google\google_appengine\dev_appserver.py", line 50, in
execfile(script_path, globals())
File "C:\Google\google_appengine\google/appengine/tools/dev_appserver_main.p
, line 107, in
ARG_DATASTORE_PATH: os.path.join(tempfile.gettempdir(),
File "C:\Python25\lib\tempfile.py", line 262, in gettempdir
tempdir = _get_default_tempdir()
File "C:\Python25\lib\tempfile.py", line 191, in _get_default_tempdir
dir = _os.path.normcase(_os.path.abspath(dir))
File "C:\Python25\lib\ntpath.py", line 500, in abspath
path = _getfullpathname(path)
TypeError: _getfullpathname() argument 1 must be (buffer overflow), not str

C:\Google\google_appengine>

i have created User Variables as well as system vairables for Appengine, but still i m getting this. i tried to change my port number too, but it is not working.... can you please help he i this regard....Thanks in Advance