On Wed, Jun 25, 2014 at 4:43 AM, Yiyang Dai <[email protected]> wrote: > Hello there, > > when I trying to extract "msg" field generated by example program > "demo-tracef" with python binding , > I got following error message: > > Traceback (most recent call last): > File "data.py", line 46, in <module> > sequence = event["msg"] > File "/usr/local/lib/python3.3/site-packages/babeltrace.py", line 806, in > __getitem__ > return field.value > File "/usr/local/lib/python3.3/site-packages/babeltrace.py", line 1279, in > value > value.append(evDef.value) > AttributeError: 'NoneType' object has no attribute 'value' > > > but everything works fine with babeltrace cmd > [15:42:32.322566678] (+?.?????????) master lttng_ust_tracef:event: { cpu_id > = 2 }, { _msg_length = 46, msg = "This is a "mystring test" formatted 0 > event 42" } > [15:42:32.322582002] (+0.000015324) master lttng_ust_tracef:event: { cpu_id > = 2 }, { _msg_length = 46, msg = "This is a "mystring test" formatted 1 > event 42" } > [15:42:32.322582838] (+0.000000836) master lttng_ust_tracef:event: { cpu_id > = 2 }, { _msg_length = 46, msg = "This is a "mystring test" formatted 2 > event 42" } > [15:42:32.322583416] (+0.000000578) master lttng_ust_tracef:event: { cpu_id > = 2 }, { _msg_length = 46, msg = "This is a "mystring test" formatted 3 > event 42" } > [15:42:32.322584002] (+0.000000586) master lttng_ust_tracef:event: { cpu_id > = 2 }, { _msg_length = 46, msg = "This is a "mystring test" formatted 4 > event 42" } > > any idea of this ?
Fixed as of 3866c8 in master and e11b8d in stable-1.2. commit 3866c8503835e6bbcafe5436992177ae15046d60 Author: Jérémie Galarneau <[email protected]> Date: Thu Jun 26 10:42:00 2014 -0400 Fix (Python bindings): Return a string if a sequence's element are chars An AttributeError exception was raised when accessing the value property of a sequence that contains a string. Reported-by: Yiyang Dai <[email protected]> Signed-off-by: Jérémie Galarneau <[email protected]> Thanks for reporting! Jérémie > > Regards, > Yiyang > > _______________________________________________ > lttng-dev mailing list > [email protected] > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev > -- Jérémie Galarneau EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
