1
votes

I'm trying to get a basic GAE tutorial to work with Windows 7.

So far I have:

  1. Installed python 2.5.4
  2. Installed the current GAE SDK
  3. Set my PATH varible to include python and the GAE
  4. Created a "hello, world" app with an app.yaml and main.py file as specified.

When I call dev_appserver.py . in my app's directory or dev_appserver.py DIRECTORY_NAME one directory above my app, I receive the error message:

Invalid arguments

Application root must be the path to the application to run in this server. Must contain a valid app.yaml or app.yml file.

[A bunch of dev_appserver.py option follow this]

What am I doing wrong? and as far as I can tell, I've correctly configured everything.

3
have you tried using the Launcher? - Wooble
Ya I ended up using the launcher a while ago and it worked fine. It's bizarre that the command line way wasn't working. - deeb

3 Answers

2
votes

I had the same problem. Adding python.exe in front of dev_appserver.py solved the problem for me.

c:\Programme\Python27\python.exe C:\Programme\Google\AppEngineSDK\google_appengine\dev_appserver.py MoviesBwu\

1
votes

Very basic example:

alfred@alfred-laptop:~/gae/test$ cat /etc/issue
Ubuntu 10.10 \n \l

alfred@alfred-laptop:~/gae$ python --version Python 2.6.6


alfred@alfred-laptop:~/gae$ pwd
/home/alfred/gae
alfred@alfred-laptop:~/gae$ ls -al
total 3444
drwxr-xr-x  4 alfred alfred    4096 2011-01-28 01:21 .
drwxr-xr-x 77 alfred alfred    4096 2011-01-28 01:23 ..
drwxr-xr-x  8 alfred alfred    4096 2010-12-16 00:06 google_appengine
-rw-r--r--  1 alfred alfred 3506301 2011-01-28 01:21 google_appengine_1.4.1.zip
drwxr-xr-x  2 alfred alfred    4096 2011-01-28 01:24 test

alfred@alfred-laptop:~/gae$ ls google_appengine_1.4.1.zip 
google_appengine_1.4.1.zip

alfred@alfred-laptop:~/gae/test$ cat app.yaml 
application: helloworld
version: 1
runtime: python
api_version: 1

handlers:
- url: /.*
  script: helloworld.py

alfred@alfred-laptop:~/gae/test$ cat helloworld.py 
print 'Content-Type: text/plain'
print ''
print 'Hello, world!'

alfred@alfred-laptop:~/gae/google_appengine$ ./dev_appserver.py ~/gae/test/
/home/alfred/gae/google_appengine/google/appengine/tools/appcfg.py:42: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import sha
/home/alfred/gae/google_appengine/google/appengine/tools/dev_appserver_login.py:33: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
INFO     2011-01-28 00:26:06,814 appengine_rpc.py:153] Server: appengine.google.com
INFO     2011-01-28 00:26:06,819 appcfg.py:414] Checking for updates to the SDK.
INFO     2011-01-28 00:26:07,014 appcfg.py:428] The SDK is up to date.
WARNING  2011-01-28 00:26:07,015 datastore_file_stub.py:573] Could not read datastore data from /tmp/dev_appserver.datastore
INFO     2011-01-28 00:26:07,047 dev_appserver_main.py:485] Running application helloworld on port 8080: http://localhost:8080

alfred@alfred-laptop:~/gae/test$ curl http://localhost:8080/
Hello, world!
0
votes

Select any .py file press alt + enter(right mouse click -> properties) select change then choose python.exe(application) for opening .py file from install directory and run your file... ;-p

Image