Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-3239

unicode characters in an iPython paragraph makes Spark interpreter irrsponsive

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 0.8.0
    • None
    • None

    Description

      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 ):

      One following unicide character makes ipythonInterpreter not responding to Cancel commands –  
      

       DEBUG interpreter log shows following:

      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

       

      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.

       

      Attachments

        1. screenshot-1.png
          98 kB
          Jeff Zhang
        2. Zeppelin-iPython_para_with_Unicode.PNG
          9 kB
          Ruslan Dautkhanov

        Activity

          People

            zjffdu Jeff Zhang
            Tagar Ruslan Dautkhanov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: