Your yaml doesn't seem to be correctly formated, should be: - model: translations.Language pk: 1 fields: code: fr display_name: Français - model: translations.Language pk: 2 fields: code: en display_name: English
model, pk, and fields are all on the same indentation level. Just spent some time trying to debug the same problem. rgds james On Tuesday, 10 April 2012 12:47:29 UTC+8, abisson wrote: > > Good afternoon, > > I am trying to do: python manage.py syncdb and I always get this error: > > Problem installing fixture '.../translations/fixtures/initial_data.yaml': > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", > > line 190, in handle > for obj in objects: > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/serializers/pyyaml.py", > > line 62, in Deserializer > raise DeserializationError(e) > DeserializationError: mapping values are not allowed here > in "/.../translations/fixtures/initial_data.yaml", line 2, column 7 > > *Model:* > > from django.db import models > > class Language(models.Model): > code = models.CharField(max_length=2) > display_name = models.CharField(max_length=16, blank=False) > > def __unicode__(self): > return self.display_name > > > *Fixture:* > > - model: translations.Language > pk: 1 > fields: > code: fr > display_name: Français > - model: translations.Language > pk: 2 > fields: > code: en > display_name: English > > > I am running PyYAML 3.10! Any ideas?! :( > > Thanks a lot, > > Antoine > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/RUNoOC4Kfr8J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.