﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15193	string indices must be integers, not str during YAML deserialization	Jack	nobody	"Traceback:
Problem installing fixture 'data\init.yaml': Traceback (most recent call last):
  File ""C:\Python26\lib\site-packages\django\core\management\commands\loaddata.p
y"", line 169, in handle
    for obj in objects:
  File ""C:\Python26\lib\site-packages\django\core\serializers\pyyaml.py"", line 5
9, in Deserializer
    for obj in PythonDeserializer(objs, **options):
  File ""C:\Python26\lib\site-packages\django\core\serializers\python.py"", line 8
4, in Deserializer
    Model = _get_model(d[""model""])
TypeError: string indices must be integers, not str

I made the following change to pyyaml.py and it fixed the problem:
{{{
def Deserializer(stream_or_string, **options):
    """"""
    Deserialize a stream or string of YAML data.
    """"""
    if isinstance(stream_or_string, basestring):
        stream = StringIO(stream_or_string)
    else:
        stream = stream_or_string
    for obj in PythonDeserializer('''[yaml.load(stream),]''', **options):
        yield obj
}}}
I'm running Windows XP SP3 with this version of pyyaml:

http://pyyaml.org/download/pyyaml/PyYAML-3.09.win32-py2.6.exe
"		new	Core (Other)	1.2					Unreviewed	0	0	0	0	0	0
