views:

183

answers:

2

I have an app which works well live on AppEngine. However, when I try to run it locally with the dev_appserver.py, it aborts within ~1 second with:

    ~/ dev_appserver.py --debug_imports myapp
/opt/local/share/google_appengine/google/appengine/api/datastore_file_stub.py:40: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
/opt/local/share/google_appengine/google/appengine/api/memcache/__init__.py:31: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import sha

I'm on OS X 10.6.3, Python 2.6.4 + Django 1.1.1 + appengine 1.3.1 (all installed via macports)

Any ideas? Thanks!

+3  A: 

App Engine only works with Python 2.5.x

Install 2.5, and run explicitly.
For example:

python2.5 /path/to/dev_appserver.py myapp

Adam Bernier
related question: http://stackoverflow.com/questions/1254028/has-anyone-succeeded-in-using-google-app-engine-with-python-version-2-6
Adam Bernier
I switched it over to python2.5 -- still the same result of exiting immediately with not even a warning message now.
Gj
I just started a bounty for this since I still can't get it to work, and with no sign or hint of what could be wrong.
Gj
@Gj: it might help to update the question to include the command you're now using (with 2.5), and any traceback you get.
Adam Bernier
+1  A: 

I had the same problem, it seems that after I installed py26-googleappengine using macports and adding its subdirs to my PATH the first dev_appserver.py found was at

/opt/local/share/google_appengine/google/appengine/tools/dev_appserver.py

When I changed it to be the other copy found at

/opt/local/share/google_appengine/dev_appserver.py

all started working normally.

The two files are vastly different...

Unlike what Adam said, it works fine for me with Python 2.6.

Inshim
Thanks!! works for me now
Gj