开发者

AppEngine dev_appserver.py aborts with no error message

开发者 https://www.devze.com 2022-12-27 03:30 出处:网络
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:

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/sha开发者_Python百科re/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!


Edit: the answer below is potentially no longer relevant depending on individual use-case as Python 2.7 is now supported on App Engine.


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号