<div dir="ltr">That fails with the following trace here, which is 2 in my list of issues.<br><br><div> File "/home/broot/sugar-build/build/out/install/lib/python2.7/site-packages/jarabe/apisocket.py", line 163, in get_properties_reply_handler<br>
self._client.send_result(request, [properties])<br> File "/home/broot/sugar-build/build/out/install/lib/python2.7/site-packages/jarabe/apisocket.py", line 258, in send_result<br> self._session.send_message(json.dumps(response))<br>
File "/usr/lib64/python2.7/json/__init__.py", line 243, in dumps<br> return _default_encoder.encode(obj)<br> File "/usr/lib64/python2.7/json/encoder.py", line 207, in encode<br> chunks = self.iterencode(o, _one_shot=True)<br>
File "/usr/lib64/python2.7/json/encoder.py", line 270, in iterencode<br> return _iterencode(o, 0)<br>UnicodeDecodeError: 'utf8' codec can't decode byte 0x89 in position 0: invalid start byte<br>
<br></div><div>The properties looks like this<br><br> dbus.Dictionary({dbus.String(u'activity'): dbus.ByteArray('org.laptop.Edit', variant_level=1), dbus.String(u'activity_id'): dbus.ByteArray('5f4ce82bb1f20fea6acb7deddd803293ee894af5', variant_level=1), dbus.String(u'org.laptop.Edit.cloudstring'): dbus.ByteArray("(dp1\nS'shared_buffer'\np2\n(lp3\n(I-1\nI-1\nI0\nI0\nS''\ntp4\na(I8793677715175311230\nI-1\nI0\nI0\nS'H'\ntp5\na(I8374422773697907387\nI8793677715175311230\nI0\nI1\nS'e'\ntp6\na(I980346379479397073\nI8374422773697907387\nI0\nI1\nS'l'\ntp7\na(I1695930828609738611\nI980346379479397073\nI0\nI1\nS'l'\ntp8\na(I4740272525434690190\nI1695930828609738611\nI0\nI1\nS'o'\ntp9\nas.", variant_level=1), dbus.String(u'title_set_by_user'): dbus.ByteArray('0', variant_level=1), dbus.String(u'uid'): dbus.String(u'16f57ff6-2dae-4ab1-aa06-4d71684ed2d6', variant_level=1), dbus.String(u'title'): dbus.ByteArray('Edit Activity', variant_level=1), dbus.String(u'timestamp'): dbus.ByteArray('1378823663', variant_level=1), dbus.String(u'org.laptop.Edit.cloudtimestamp'): dbus.ByteArray('5.71', variant_level=1), dbus.String(u'creation_time'): dbus.ByteArray('1378823663', variant_level=1), dbus.String(u'share-scope'): dbus.ByteArray('private', variant_level=1), dbus.String(u'keep'): dbus.ByteArray('0', variant_level=1), dbus.String(u'icon-color'): dbus.ByteArray('#008009,#FF2B34', variant_level=1), dbus.String(u'launch-times'): dbus.ByteArray('1378823658', variant_level=1), dbus.String(u'filesize'): dbus.String(u'5', variant_level=1), dbus.String(u'checksum'): dbus.ByteArray('8b1a9953c4611296a827abf8c47804d7', variant_level=1), dbus.String(u'org.laptop.Edit.contents'): dbus.ByteArray('Hello', variant_level=1), dbus.String(u'preview'): dbus.ByteArray('\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\xd8\x00\x00\x00\xa2\x08\x06\x00\x00\x00#\x99\x03J\x00\x00\x00\x06bKGD\x00\xff\x00\xff\x00\xff\xa0\xbd\xa7\x93\x00\x00\x01\xadIDATx\x9c\xed\xd3A\r\x83\x00\x10\x00\xc1k\x85"\x01/X@\x0cO\x14\x91P\r}lH\xc8\x8c\x82\xfd\xec\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc03>\xdb\xb6\xdd\xeb\xba\xce\xcc\xcc\xbe\xef\xb3,\xcb\xc3I\xf0\x1e\xdf\xe38ff\xe6\xba\xae\x99\x999\xcf\xf3\xc9\x1ex\x95\xcf}\xdf\xf7\xd3\x11\xf0V\xdf\xa7\x03\xe0\xcd\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06!\x83A\xc8`\x102\x18\x84\x0c\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xf8\x01\xe1&\x13\x89*\xf6\xc8\xe4\x00\x00\x00\x00IEND\xaeB`\x82', variant_level=1), dbus.String(u'mtime'): dbus.ByteArray('2013-09-10T14:34:23.986468', variant_level=1), dbus.String(u'mime_type'): dbus.ByteArray('text/plain', variant_level=1)}, signature=dbus.Signature('sv'))<br>
</div><div><br></div><div>So we have both normal strings and binary data wrapped in a dbus.Array and no way to know which is which.<br><br>I tend to think we should base64 encode all the values (we could skip dbus.String but I'm not too sure we would save bytes, because then for each value we need to tell which type it is). Then on the js side we can window.atob() all the values. To be honest I don't understand exactly what atob returns but whatever it is, it can be used as a string and it can transformed into a byte array (<a href="https://gist.github.com/borismus/1032746">https://gist.github.com/borismus/1032746</a>), so we should be fine.<br>
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 10 September 2013 16:20, Suraj K S <span dir="ltr"><<a href="mailto:suraj.gillespie@gmail.com" target="_blank">suraj.gillespie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ah. That version wasn't working on my comp either.<div><br></div><div> Try this <a href="http://git.sugarlabs.org/~flavio/edit-activity/editgtk3" target="_blank">http://git.sugarlabs.org/~flavio/edit-activity/editgtk3</a><br>
</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 10 September 2013 19:47, Daniel Narvaez <span dir="ltr"><<a href="mailto:dwnarvaez@gmail.com" target="_blank">dwnarvaez@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This one<br><br><a href="http://activities.sugarlabs.org/en-US/sugar/addon/4349" target="_blank">http://activities.sugarlabs.org/en-US/sugar/addon/4349</a><br>
</div><div class="gmail_extra"><div><br><br><div class="gmail_quote">
On 10 September 2013 16:16, Daniel Narvaez <span dir="ltr"><<a href="mailto:dwnarvaez@gmail.com" target="_blank">dwnarvaez@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Which environment are you using for testing? I tried in sugar-build, downloaded Edit from <a href="http://activities.sugarlabs.org" target="_blank">activities.sugarlabs.org</a> and it wouldn't start. Maybe just a dependency issue, I didn't investigate, but I want to be sure we are using the same environment...<br>
</div>
</blockquote></div><br><br clear="all"><br></div><span><font color="#888888">-- <br>Daniel Narvaez<br>
</font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Daniel Narvaez<br>
</div>