I have an error message on django 1.4:
dictionary update sequence element #0 has length 1; 2 is required
[EDIT]
It happe
Error in your question is raised when you try something like following:
>>> a_dictionary = {}
>>> a_dictionary.update([[1]])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: dictionary update sequence element #0 has length 1; 2 is required
It's hard to tell where is the cause in your code unless you show your code, full traceback.
Here is the reproduced error.
>>> d = {}
>>> d.update([(1,)])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: dictionary update sequence element #0 has length 1; 2 is required
>>>
>>> d
{}
>>>
>>> d.update([(1, 2)])
>>> d
{1: 2}
>>>
>>> d.update('hello_some_string')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: dictionary update sequence element #0 has length 1; 2 is required
>>>
If you give the sequence and any element length is 1 and required two then we will get this kind of error. See the above code. First time I gave the sequence with tuple and it's length 1, then we got the error and dictionary is not updated. second time I gave inside tuple with with two elements, dictionary got updated.