Fixed
Status Update
Comments
ma...@google.com <ma...@google.com>
bi...@gmail.com <bi...@gmail.com> #2
Ideally, there'd be an optional parameter to skip chosen properties with to_xml().
Sometimes, we want to output XML for some entity properties without blobs and
possibly text dumps tagging along.
Sometimes, we want to output XML for some entity properties without blobs and
possibly text dumps tagging along.
Description
1. create a model with a blob property
2. create a new object of this type
3. with this object : myobj.to_xml()
What is the expected output? What do you see instead?
expected : display the xml
i see an error :
Traceback (most recent call last):
File "C:\Program
Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py",
line 501, in __call__
File "C:\Outils\eclipse\workspace\nopix\src\main.py", line 101, in post
File "C:\Program
Files\Google\google_appengine\google\appengine\ext\db\__init__.py", line
718, in to_xml
return entity.ToXml()
File "C:\Program
Files\Google\google_appengine\google\appengine\api\datastore.py", line 403,
in ToXml
xml += '\n ' + '\n '.join(self._PropertiesToXml(properties))
File "C:\Program
Files\Google\google_appengine\google\appengine\api\datastore.py", line 433,
in _PropertiesToXml
escaped_values = self._XmlEscapeValues(propname)
File "C:\Program
Files\Google\google_appengine\google\appengine\api\datastore.py", line 464,
in _XmlEscapeValues
xml.append(saxutils.escape(unicode(val)))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0:
ordinal not in range(128)
What version of the product are you using? On what operating system?
GAE 1.10 / Win XP sp2
Please provide any additional information below.
class Image(db.Model):
pic = db.BlobProperty()
mypic = Image()
xml = mypic.to_xml() --> CRASH