问题描述
我试图在google-appengine 1.6.4中运行程序for python 2.7。
无法运行简单的helloworld令人沮丧。
我遇到的错误: -
shadyabhi @ MBP-archlinux〜/ codes / gae $ dev_appserver.py helloworld /
INFO 2012-04-06 23:25:55,030 appengine_rpc.py:160]服务器:appengine.google.com
INFO 2012-04-06 23:25:55,034 appcfg.py:582]检查SDK的更新。
INFO 2012-04-06 23:25:56,709 appcfg.py:616]此SDK版本比广告版本更新。
WARNING 2012-04-06 23:25:56,710 datastore_file_stub.py:513]无法从/tmp/dev_appserver.datastore读取数据存储区数据
INFO 2012-04-06 23:25:56,773 dev_appserver_multiprocess。 py:647]在端口8080上运行应用程序dev〜helloworld:http:// localhost:8080
INFO 2012-04-06 23:25:56,774 dev_appserver_multiprocess.py:649]管理控制台位于:http:/ / localhost:8080 / _ah / admin
WARNING 2012-04-06 23:26:00,928 py_zipimport.py:139]无法打开zipfile /usr/lib/python2.7/site-packages/setuptools-0.6 c11.egg-info:IOError:[Errno 13] file not accessible:'/usr/lib/python2.7/site-packages/setuptools-0.6c11.egg-info'
错误2012-04-06 23 :26:01,101 wsgi.py:189]
Traceback(最近一次调用的最后一次):
文件/opt/google-appengine-python/google/appengine/runtime/wsgi.py,第187行,处理
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
文件/opt/google-appengine-python/google/appengine/runtime/wsgi.py,l在_LoadHandler
中提升ImportError('%s没有属性%s'%(handler,name))
ImportError:< module'helloworld'from'/ home / shadyabhi / codes / gae /helloworld/helloworld.pyc'>没有属性app
INFO 2012-04-06 23:26:01,110 dev_appserver.py:2884]GET / HTTP / 1.1500 -
ERROR 2012-04-06 23:26:01,479 wsgi .py:189]
Traceback(最近一次调用最后一次):
文件/opt/google-appengine-python/google/appengine/runtime/wsgi.py,行187中的Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
在_LoadHandler
文件中的/opt/google-appengine-python/google/appengine/runtime/wsgi.py,第239行ImportError('%s没有属性%s'%(handler,name))
ImportError:< module'helloworld'from'/home/shadyabhi/codes/gae/helloworld/helloworld.pyc'>没有属性app
INFO 2012-04-06 23:26:01,486 dev_appserver.py:2884]GET /favicon.ico HTTP / 1.1500 -
github上的文件和是你的helloworld文件似乎并没有被命名为helloworld.py。可能会有帮助吗?
另外,您是否需要在helloworld顶部的PROJECT_DIR变量?
如果你正在努力使基础教程工作,你应该做的第一件事是确保你的项目与谷歌的例子完全一样。
I am trying to run the official helloworld program in google-appengine 1.6.4 for python 2.7.
It's so frustrating to be not able to run a simple helloworld. I would appreciate any kind of help here.
Error I encounter:-
shadyabhi@MBP-archlinux ~/codes/gae $ dev_appserver.py helloworld/
INFO 2012-04-06 23:25:55,030 appengine_rpc.py:160] Server: appengine.google.com
INFO 2012-04-06 23:25:55,034 appcfg.py:582] Checking for updates to the SDK.
INFO 2012-04-06 23:25:56,709 appcfg.py:616] This SDK release is newer than the advertised release.
WARNING 2012-04-06 23:25:56,710 datastore_file_stub.py:513] Could not read datastore data from /tmp/dev_appserver.datastore
INFO 2012-04-06 23:25:56,773 dev_appserver_multiprocess.py:647] Running application dev~helloworld on port 8080: http://localhost:8080
INFO 2012-04-06 23:25:56,774 dev_appserver_multiprocess.py:649] Admin console is available at: http://localhost:8080/_ah/admin
WARNING 2012-04-06 23:26:00,928 py_zipimport.py:139] Can't open zipfile /usr/lib/python2.7/site-packages/setuptools-0.6c11.egg-info: IOError: [Errno 13] file not accessible: '/usr/lib/python2.7/site-packages/setuptools-0.6c11.egg-info'
ERROR 2012-04-06 23:26:01,101 wsgi.py:189]
Traceback (most recent call last):
File "/opt/google-appengine-python/google/appengine/runtime/wsgi.py", line 187, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/opt/google-appengine-python/google/appengine/runtime/wsgi.py", line 239, in _LoadHandler
raise ImportError('%s has no attribute %s' % (handler, name))
ImportError: <module 'helloworld' from '/home/shadyabhi/codes/gae/helloworld/helloworld.pyc'> has no attribute app
INFO 2012-04-06 23:26:01,110 dev_appserver.py:2884] "GET / HTTP/1.1" 500 -
ERROR 2012-04-06 23:26:01,479 wsgi.py:189]
Traceback (most recent call last):
File "/opt/google-appengine-python/google/appengine/runtime/wsgi.py", line 187, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/opt/google-appengine-python/google/appengine/runtime/wsgi.py", line 239, in _LoadHandler
raise ImportError('%s has no attribute %s' % (handler, name))
ImportError: <module 'helloworld' from '/home/shadyabhi/codes/gae/helloworld/helloworld.pyc'> has no attribute app
INFO 2012-04-06 23:26:01,486 dev_appserver.py:2884] "GET /favicon.ico HTTP/1.1" 500 -
One difference between the files that you have on github and the official google hellworld tutorial is that your helloworld file doesn't seem to be named helloworld.py. Potentially that would help?
Additionally, do you need that PROJECT_DIR variable at the top of helloworld?
If you are struggling to get the basic tutorial working, the first thing you should do is make sure that your project is literally the exact same as the google example.
这篇关于无法在gae中运行简单的helloworld(python 2.7)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!