#8607: yaml serialization to file fails
------------------------------+---------------------------------------------
 Reporter:  antony_hatchkins  |       Owner:  nobody    
   Status:  new               |   Milestone:            
Component:  Serialization     |     Version:  SVN       
 Keywords:  yaml              |       Stage:  Unreviewed
Has_patch:  1                 |  
------------------------------+---------------------------------------------
 When serializing anything to yaml with stream=open('file','w') it fails
 with the following error:

 >>> XMLSerializer = serializers.get_serializer('yaml')
 >>> serializer = XMLSerializer()
 >>> serializer.serialize(Partner.objects.all(),
 stream=open('partners.yaml', 'w'))

 Traceback (most recent call last):
   File "./bin/serialization/serialize_partners.py", line 16, in <module>
     serializer.serialize(Partner.objects.all(), stream=out)
   File "/var/django/phones-lev/django/core/serializers/base.py", line 56,
 in serialize
     return self.getvalue()
   File "./django/core/serializers/pyyaml.py", line 43, in getvalue
     return self.stream.getvalue()
 AttributeError: 'file' object has no attribute 'getvalue'

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8607>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to