tickets: 8607
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8607 | 2008-08-27 12:45:41 | 2008-09-05 15:01:03 | 2022-03-06 03:42:42.203115 | Unreviewed | closed | Core (Serialization) | dev | fixed | yaml serialization to file fails | 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' | nobody | antony_hatchkins | yaml | 0 | 1 | 0 | 0 | 0 | 0 |