相关疑难解决方法(0)

错误:"Django 1.4上的字典更新序列元素#0的长度为1;需要2"

我在django 1.4上有一条错误消息:

字典更新序列元素#0的长度为1; 2是必需的

[编辑]

它发生在我尝试使用模板标签时:`{%for v in values%}:

dictionary update sequence element #0 has length 1; 2 is required

Request Method:     GET
Request URL:    ...
Django Version:     1.4.5
Exception Type:     ValueError
Exception Value:    

dictionary update sequence element #0 has length 1; 2 is required

Exception Location:     /usr/local/lib/python2.7/dist-packages/djorm_hstore/fields.py in __init__, line 21
Python Executable:  /usr/bin/uwsgi-core
Python Version:     2.7.3
Python Path:    

['/var/www/',
 '.',
 '',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PIL',
 '/usr/lib/pymodules/python2.7']

Server time:    sam, 13 Jul 2013 16:15:45 +0200 …
Run Code Online (Sandbox Code Playgroud)

python django uwsgi

133
推荐指数
7
解决办法
16万
查看次数

标签 统计

django ×1

python ×1

uwsgi ×1