我正在尝试从使用Django-nonrel的allbuttonpressed运行django-testapp 。
当我从django-testapp运行manage.py时,它给出了一个错误,说明
C:\Projects\Goog\django-testapp>manage.py
Traceback (most recent call last):
File "C:\Projects\Goog\django-testapp\manage.py", line 4, in <module>
import settings # Assumed to be in the same directory.
File "C:\Projects\Goog\django-testapp\settings.py", line 4, in <module>
from djangoappengine.settings_base import *
File "C:\Projects\Goog\django-testapp\djangoappengine\settings_base.py", line 6, in <module>
setup_env()
File "C:\Projects\Goog\django-testapp\djangoappengine\boot.py", line 64, in setup_env
setup_project()
File "C:\Projects\Goog\django-testapp\djangoappengine\boot.py", line 114, in setup_project
from .utils import have_appserver, on_production_server
File "C:\Projects\Goog\django-testapp\djangoappengine\utils.py", line 12, in <module>
appconfig, unused = dev_appserver.LoadAppConfig(PROJECT_DIR, {})
File "D:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3440, in LoadAppConfig
File "D:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3295, in ReadAppConfig
File "D:\Program Files (x86)\Google\google_appengine\google\appengine\api\appinfo.py", line 444, in LoadSingleAppInfo
File "D:\Program Files (x86)\Google\google_appengine\google\appengine\api\yaml_listener.py", line 218, in Parse
self._HandleEvents(self._GenerateEventParameters(stream, loader_class))
File "D:\Program Files (x86)\Google\google_appengine\google\appengine\api\yaml_listener.py", line 169, in _HandleEvents
raise yaml_errors.EventError(e, event_object)
google.appengine.api.yaml_errors.EventError: Unexpected attribute 'builtins' for object of type <class 'google.appengine.api.appinfo.AppInfoExternal'>.
in "C:\Projects\Goog\django-testapp\app.yaml", line 7, column 1
我正在使用最新的1.4 GAE SDK
任何人都知道这是Django-nonrel的问题还是我的设置特有的问题。
app.yaml文件:
application: ctst
version: 1
runtime: python
api_version: 1
builtins:
- remote_api: on
inbound_services:
- warmup
handlers:
- url: /_ah/queue/deferred
script: djangoappengine/deferred/handler.py
login: admin
- url: /media/admin
static_dir: django/contrib/admin/media
expiration: '0'
- url: /.*
script: djangoappengine/main/main.py
答案 0 :(得分:2)
app.yaml文件中有错误。尝试重置它并运行应用程序。
答案 1 :(得分:1)
您实际上并未使用最新的SDK。可能你安装了多个SDK,而Django使用的是另一个。请务必将D:\Program Files (x86)\Google\google_appengine
中的版本更新为最新版本。
答案 2 :(得分:-1)
如果你有一个名为index.yalm和其他app.yalm的文件,请尝试删除index.yalm并测试它。我有同样的问题,我已经解决了。