New IPython backend for Spark interpreter breaks Python 2 compatibility
because of grpc.

Basically if you have an unicode character in a static string or even in a
comment, it'll break Spark interpreter.

Below update on gRPC issue says
that in Python 2
we should directly encode data explicitly before sending it over to grpc.

If unicode data is present, in frontend it just looks as paragraph is in
"RUNNING" state with no ability
to cancel it. The only way to "unhang" spark interpreter is to restart it.

It seems spark interpreter --> grpc --> ipython backend is currently
somewhat brittle as any exception
stops grpc stream [1].
Would it be possible to adjust code in ipython logic to restart grpc stream
for each paragraph run?
Like explained in

Filed to consider
implementing this.


INFO [2018-02-14 10:39:10,923] ({grpc-default-worker-ELG-1-2}[inboundDataReceived]:249) - Received data on
closed stream
INFO [2018-02-14 10:39:10,924] ({grpc-default-worker-ELG-1-2}[inboundDataReceived]:249) - Received data on
closed stream
INFO [2018-02-14 10:39:10,925] ({grpc-default-worker-ELG-1-2}[inboundDataReceived]:249) - Received data on
closed stream

---------- Forwarded message ----------
From: kpayson64 <>
Date: Mon, Feb 19, 2018 at 2:47 PM
Subject: Re: [grpc/grpc] Unicode support in Python 2? (#14446)
To: grpc/grpc <>
Cc: Ruslan Dautkhanov <>, Author <>

I can confirm that Python 2 gRPC doesn't accept unicode characters. The
Python gRPC API accepts the string type, which in Python 2 is equivalent to
the byte type. Applications should do any encoding if they are using
unicode characters.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<>, or mute
the thread

Reply via email to