Axel Van Damme created ZEPPELIN-5988:
----------------------------------------
Summary: Bokeh output in IPySpark is not in correct format
Key: ZEPPELIN-5988
URL: https://issues.apache.org/jira/browse/ZEPPELIN-5988
Project: Zeppelin
Issue Type: Bug
Components: pySpark
Affects Versions: 0.10.1
Environment: Latest Apache Zeppelin compiled from sources
Reporter: Axel Van Damme
I'm using the latest Zeppelin version compile from the source code (Version
0.11.0-SNAPSHOT)
I'm facing the issue explained in
https://issues.apache.org/jira/browse/ZEPPELIN-4771
It means that when running a simple Bokeh code with %ipyspark (or even with
%python.ipython)interpreter, the text output is not correctly formatted.
You can try for example with this example where I did a on purpose typo:
%ipyspark
import numpy as np
from bokeh.plotting import figure, show, output_notebook
output_notebook()
x = np.linspace(-6, 6, 500)
y = 8*np.sin(x)*np.sinc(x)
p = figure(width=800, height=300, title="", tools="",
toolbar_location=None, match_aspect=True)
p.line(x, ey, color="navy", alpha=0.4, line_width=4)
show(p)
then the output is scrabbled like this:
Loading BokehJS ...
[0;31m---------------------------------------------------------------------------[0m
[0;31mNameError[0m Traceback (most recent call last) Cell [0;32mIn[40],
line 12[0m [1;32m 7[0m y [38;5;241m=[39m
[38;5;241m8[39m[38;5;241m*[39mnp[38;5;241m.[39msin(x)[38;5;241m*[39mnp[38;5;241m.[39msinc(x)
[1;32m 9[0m p [38;5;241m=[39m
figure(width[38;5;241m=[39m[38;5;241m800[39m,
height[38;5;241m=[39m[38;5;241m300[39m,
title[38;5;241m=[39m[38;5;124m"[39m[38;5;124m"[39m,
tools[38;5;241m=[39m[38;5;124m"[39m[38;5;124m"[39m, [1;32m 10[0m
toolbar_location[38;5;241m=[39m[38;5;28;01mNone[39;00m,
match_aspect[38;5;241m=[39m[38;5;28;01mTrue[39;00m) [0;32m---> 12[0m
p[38;5;241m.[39mline(x, [43mey[49m,
color[38;5;241m=[39m[38;5;124m"[39m[38;5;124mnavy[39m[38;5;124m"[39m,
alpha[38;5;241m=[39m[38;5;241m0.4[39m,
line_width[38;5;241m=[39m[38;5;241m4[39m) [1;32m 14[0m show(p)
[0;31mNameError[0m: name 'ey' is not defined
--
This message was sent by Atlassian Jira
(v8.20.10#820010)