From 1181b17a5d9143a5cde9e36dabc751965f904142 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Mon, 16 Apr 2018 16:45:00 +0100 Subject: [PATCH] trace.py: Fix events name type Events name must be ascii strings. Unicode strings will break trappy, so encode them to ascii first. --- libs/utils/trace.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/utils/trace.py b/libs/utils/trace.py index e6c059374..77ef843d2 100644 --- a/libs/utils/trace.py +++ b/libs/utils/trace.py @@ -230,7 +230,9 @@ class Trace(object): else: window_kw['abs_window'] = window - self.ftrace = trace_class(path, scope="custom", events=self.events, + # Make sure event names are not unicode strings + events = [e.encode('ascii') for e in self.events] + self.ftrace = trace_class(path, scope="custom", events=events, normalize_time=self.normalize_time, **window_kw) # Load Functions profiling data -- GitLab