Ruslan Dautkhanov created ZEPPELIN-3239:
-------------------------------------------

             Summary: unicode characters in an iPython paragraph makes Spark 
interpreter irrsponsive
                 Key: ZEPPELIN-3239
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-3239
             Project: Zeppelin
          Issue Type: Bug
            Reporter: Ruslan Dautkhanov
         Attachments: Zeppelin-iPython_para_with_Unicode.PNG

An unicode characters in an iPython paragraph makes Spark interpreter 
irresponsive.

To reproduce, type into a new %ipyspark code following phase (yes, it's not a 
valid python code but the imprtant part is that it has a long unicode dash 
character ):
{code}
One following unicide character makes ipythonInterpreter not responding to 
Cancel commands –  
{code}
 DEBUG interpreter log shows following:
{quote}DEBUG [2018-02-15 00:39:45,628] (\{pool-2-thread-2} 
IPythonClient.java[stream_execute]:87) - stream_execute code:
One following unicide character makes ipythonInterpreter not responding to 
Cancel commands –
DEBUG [2018-02-15 00:39:45,632] (\{Exec Stream Pumper} 
IPythonInterpreter.java[processLine]:388) - Process Output: 
ERROR:root:Exception iterating responses: 'ascii' codec can't encode character 
u'\u2013' in position 91: ordinal not in range(128)
DEBUG [2018-02-15 00:39:45,632] (\{Exec Stream Pumper} 
IPythonInterpreter.java[processLine]:388) - Process Output: Traceback (most 
recent call last):
DEBUG [2018-02-15 00:39:45,633] (\{Exec Stream Pumper} 
IPythonInterpreter.java[processLine]:388) - Process Output: File 
"/opt/cloudera/parcels/Anaconda/lib/python2.7/site-packages/grpc/_server.py", 
line 401, in _take_response_from_response_iterator
ERROR [2018-02-15 00:39:45,633] (\{grpc-default-executor-0} 
IPythonClient.java[onError]:138) - Fail to call IPython grpc
io.grpc.StatusRuntimeException: UNKNOWN: Exception iterating responses: 'ascii' 
codec can't encode character u'\u2013' in position 91: ordinal not in range(128)
 at io.grpc.Status.asRuntimeException(Status.java:543)
 at 
io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:395)
 at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:426)
 at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76)
 at 
io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:512)
 at 
io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:429)
 at 
io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:544)
 at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52)
 at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:117)
 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)
DEBUG [2018-02-15 00:39:45,633] (\{Exec Stream Pumper} 
IPythonInterpreter.java[processLine]:388) - Process Output: return 
next(response_iterator), True
DEBUG [2018-02-15 00:39:45,633] (\{Exec Stream Pumper} 
IPythonInterpreter.java[processLine]:388) - Process Output: File 
"/tmp/zeppelin_ipython1942535087961089556/ipython_server.py", line 54, in 
execute
DEBUG [2018-02-15 00:39:45,633] (\{Exec Stream Pumper} 
IPythonInterpreter.java[processLine]:388) - Process Output: print(request.code)
DEBUG [2018-02-15 00:39:45,634] (\{Exec Stream Pumper} 
IPythonInterpreter.java[processLine]:388) - Process Output: UnicodeEncodeError: 
'ascii' codec can't encode character u'\u2013' in position 91: ordinal not in 
range(128)
 INFO [2018-02-15 00:39:58,894] (\{dispatcher-event-loop-23} 
Logging.scala[logInfo]:54) - Registered executor 
NettyRpcEndpointRef(spark-client://Executor) (10.20.33.75:40434) with ID 2
{quote}
 

Notice 

"Process Output: UnicodeEncodeError: 'ascii' codec can't encode character 
u'\u2013' in position 91: ordinal not in range(128) "

So iPython interpreter breaks on presence of any unicode data.

!Zeppelin-iPython_para_with_Unicode.PNG!

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to