Hi all,

Thanks for the answer. I actually checked out a newer version from the git repo 
and it did work. 

Cheers and thanks again,

Yan Grange
> On 3 feb. 2015, at 16:10, Jérémie Galarneau <[email protected]> 
> wrote:
> 
> Forgot to CC lttng-dev:
> 
> On second thought, this is expected since this is the example from
> master which demonstrates the use of new APIs.
> The "name" property didn't exist in 1.2.
> 
> Regards,
> Jérémie
> 
> On Fri, Jan 23, 2015 at 11:00 AM, Yan Grange <[email protected]> wrote:
>> Good afternoon,
>> 
>> I have been able to get lttng running on a machine and now would like to do 
>> some experiments with babeltrace. I’d like to write out a ctf file using 
>> babeltrace. Therefore I wanted to try out the babeltrace python bindings out 
>> and since you provide a set of examples, of which one is about writing a 
>> ctf, I wanted to try that one out.
>> 
>> When I use the latste release of babeltrace (1.2.4), the library fails on 
>> the following line:
>> 
>> print("Clock name is \"{}\"".format(clock.name))
>> 
>> because it seems like the getter for clock.name doesn’t exist. to solve the 
>> issues I have with this example, I have checked out the most recent version 
>> of babeltrace from the git repo. If I run the ctf_writer using python, I get
>> 
>> yan@paul ~/build_bbt/babeltrace/bindings/python/examples $ python3 
>> ctf_writer.py
>> Writing trace at /tmp/tmptlhq3i
>> Clock name is "A_clock"
>> Clock description is "Simple clock"
>> Clock frequency is 1000000000
>> Clock precision is 1
>> Clock offset_seconds is 0
>> Clock offset is 0
>> Clock is absolute: False
>> Clock time is 0
>> Clock UUID is 874be90c-6c68-46ee-ac0d-6142cafe23f5
>> 
>> Fields in default packet context:
>> <class 'babeltrace.CTFWriter.IntegerFieldDeclaration'> timestamp_begin
>> <class 'babeltrace.CTFWriter.IntegerFieldDeclaration'> timestamp_end
>> <class 'babeltrace.CTFWriter.IntegerFieldDeclaration'> content_size
>> <class 'babeltrace.CTFWriter.IntegerFieldDeclaration'> packet_size
>> <class 'babeltrace.CTFWriter.IntegerFieldDeclaration'> events_discarded
>> <babeltrace.CTFWriter.Writer object at 0x7f57058360d0>
>> close: Bad file descriptor
>> Traceback (most recent call last):
>>  File "ctf_writer.py", line 130, in <module>
>>    stream.append_event(event)
>>  File "/usr/lib64/python3.3/site-packages/babeltrace.py", line 3462, in 
>> append_event
>>    raise ValueError("Could not append event to stream.")
>> ValueError: Could not append event to stream.
>> 
>> 
>> Is this a reproducible issue? I am on a gentoo system (3.17.7), with python3 
>> version Python 3.3.5 (default, Jan 14 2015, 19:01:12) [GCC 4.8.3] on linux
>> 
>> For compilation, I used the following flags of the configure script:
>> 
>> ./configure --prefix=/usr --build=x86_64-pc-linux-gnu 
>> --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info 
>> --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib 
>> --disable-dependency-tracking --disable-silent-rules --libdir=/usr/lib64 
>> --enable-glibtest --enable-python-bindings
>> 
>> Is there anything I cold do to fix this?
>> 
>> Regards,
>> 
>> Yan Grange
>> 
>> 
>> 
>> _______________________________________________
>> 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

Reply via email to