zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #02615
[Bug 691167] [NEW] The payload is sometimes mentioned as string and sometimes as array of bytes
Public bug reported:
In the event serialization format, the third array is array of bytes or
ay as dbus signature.
When an event enters an extension, it looks like
Event([dbus.Array([u'', u'1292500628312', u'', u'', u'application://foo.desktop'], signature=dbus.Signature('s')), [Subject([u'', u'', u'', u'', u'', u'', u''])], dbus.Array([], signature=dbus.Signature('y'))])
which implies that payload is array of bytes
Now look at _zeitgeist/engine/datamodel.py at line 58
where you get the line
>> popo.append(str(ev[2]))
Really so when you do str() on dbus.Array([], signature=dbus.Signature('y'))
you get "dbus.Array([], signature=dbus.Signature('y'))" instead of the contents of bytes converted to string
Now when you call Event.get_plain on
Event([dbus.Array([u'', u'1292500628312', u'', u'',
u'application://foo.desktop'], signature=dbus.Signature('s')),
[Subject([u'', u'', u'', u'', u'', u'', u''])], dbus.Array([],
signature=dbus.Signature('y'))])
you get
[[u'', u'1292500628312', u'', u'', u'application://foo.desktop'], [[u'',
u'', u'', u'', u'', u'', u'']], "dbus.Array([],
signature=dbus.Signature('y'))"]
Now what you expect
** Affects: zeitgeist
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.
https://bugs.launchpad.net/bugs/691167
Title:
The payload is sometimes mentioned as string and sometimes as array of bytes
Status in Zeitgeist Framework:
New
Bug description:
In the event serialization format, the third array is array of bytes or ay as dbus signature.
When an event enters an extension, it looks like
Event([dbus.Array([u'', u'1292500628312', u'', u'', u'application://foo.desktop'], signature=dbus.Signature('s')), [Subject([u'', u'', u'', u'', u'', u'', u''])], dbus.Array([], signature=dbus.Signature('y'))])
which implies that payload is array of bytes
Now look at _zeitgeist/engine/datamodel.py at line 58
where you get the line
>> popo.append(str(ev[2]))
Really so when you do str() on dbus.Array([], signature=dbus.Signature('y'))
you get "dbus.Array([], signature=dbus.Signature('y'))" instead of the contents of bytes converted to string
Now when you call Event.get_plain on
Event([dbus.Array([u'', u'1292500628312', u'', u'', u'application://foo.desktop'], signature=dbus.Signature('s')), [Subject([u'', u'', u'', u'', u'', u'', u''])], dbus.Array([], signature=dbus.Signature('y'))])
you get
[[u'', u'1292500628312', u'', u'', u'application://foo.desktop'], [[u'', u'', u'', u'', u'', u'', u'']], "dbus.Array([], signature=dbus.Signature('y'))"]
Now what you expect
Follow ups
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Seif Lotfy, 2011-05-21
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Seif Lotfy, 2011-05-21
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Seif Lotfy, 2011-05-05
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: मनीष सिन्हा, 2011-04-18
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Seif Lotfy, 2011-04-12
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Seif Lotfy, 2011-02-10
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Siegfried Gevatter, 2011-02-10
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Seif Lotfy, 2011-01-19
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Seif Lotfy, 2011-01-17
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Seif Lotfy, 2011-01-12
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Siegfried Gevatter, 2010-12-28
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Manish Sinha, 2010-12-20
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Seif Lotfy, 2010-12-20
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Seif Lotfy, 2010-12-20
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Seif Lotfy, 2010-12-20
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Manish Sinha, 2010-12-17
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Seif Lotfy, 2010-12-17
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Manish Sinha, 2010-12-17
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Manish Sinha, 2010-12-16
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Manish Sinha, 2010-12-16
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Manish Sinha, 2010-12-16
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Markus Korn, 2010-12-16
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Manish Sinha, 2010-12-16
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Manish Sinha, 2010-12-16
-
[Bug 691167] Re: The payload is sometimes mentioned as string and sometimes as array of bytes
From: Markus Korn, 2010-12-16
-
[Bug 691167] [NEW] The payload is sometimes mentioned as string and sometimes as array of bytes
From: Manish Sinha, 2010-12-16
References