From f0f1be169fe77f55e557270198445881492e6881 2013-09-15 18:33:54 From: MinRK Date: 2013-09-15 18:33:54 Subject: [PATCH] engine ID metadata should be unicode, not bytes fixes `TypeError: b'f5b984b0-fd8c-4873-a23e-658425c1e28a' is not JSON serializable` when an engine dies while working on a task in Python 3. candidate for backport --- diff --git a/IPython/parallel/controller/scheduler.py b/IPython/parallel/controller/scheduler.py index 01fec8a..cc589fc 100644 --- a/IPython/parallel/controller/scheduler.py +++ b/IPython/parallel/controller/scheduler.py @@ -358,7 +358,7 @@ class TaskScheduler(SessionFactory): # build fake metadata md = dict( status=u'error', - engine=engine, + engine=engine.decode('ascii'), date=datetime.now(), ) msg = self.session.msg('apply_reply', content, parent=parent, metadata=md)