2

尝试进行设置时,我遇到以下错误:

Traceback (most recent call last):
File "manage.py", line 11, in <module>
import settings
File "/Users/Paul/Documents/shopifywarrantymanager/settings.py", line 7, in <module>
from djangoappengine.settings_base import *
File "/Users/Paul/Documents/shopifywarrantymanager/djangoappengine/settings_base.py",     line 6, in <module>
setup_env()
File "/Users/Paul/Documents/shopifywarrantymanager/djangoappengine/boot.py", line 64, in setup_env
setup_project()
File "/Users/Paul/Documents/shopifywarrantymanager/djangoappengine/boot.py", line 114, in setup_project
from .utils import have_appserver, on_production_server
File "/Users/Paul/Documents/shopifywarrantymanager/djangoappengine/utils.py", line 12, in <module>
appconfig, unused = dev_appserver.LoadAppConfig(PROJECT_DIR, {})
ValueError: too many values to unpack

除了添加我的 API 密钥/共享密钥并将“app.yaml”中的应用程序名称更改为我在 GAE 注册的名称之外,我没有以任何方式更改文件。

4

1 回答 1

3

我认为您使用的是旧版本的Djangoappengine.

LoadAppConfig从 SDK 1.6 开始的方法返回三个值的元组(AppInfoExternal, URLMatcher, from_cache);中的代码utils.py是错误的,因为它只需要两个值。

如果您查看更新版本的 Djangoappengine,您可以看到该方法被正确调用:

appconfig = dev_appserver.LoadAppConfig(PROJECT_DIR, 
                                        {},
                                        default_partition='dev')[0]
于 2012-08-18T12:03:38.660 回答