任何人都繞過以下Bokeh值錯誤。任何快速解決?散焦值錯誤
File "C:\ProgramData\Anaconda3\lib\site-packages\bokeh\resources.py", line 218, in __init__
"'inline', 'cdn', 'server(-dev)', 'relative(-dev)' or 'absolute(-dev)', got %r" % self.mode)
ValueError: wrong value for 'mode' parameter, expected 'inline', 'cdn', 'server(-dev)', 'relative(-dev)' or 'absolute(-dev)', got 'BOKEH_RESOURCES=inline'
Python代碼我使用在下面給出,
from bokeh.plotting import figure, show, output_file
from bokeh.resources import CDN
from bokeh.embed import file_html
x = elastic_Rest_y_disp
A = figure(title="Wing Station vs Shear Force along y direction",y_range=(500,38000),plot_width=900, plot_height=700,toolbar_location="left",toolbar_sticky=False)
A.xaxis.axis_label = "Wing Station"
A.yaxis.axis_label = "Force (lbs)"
A.line(x, elastic_Rest_CY, legend="elastic_Rest_CY",line_color="black", line_dash=[4, 4],line_width=2)
A.square(x, elastic_Rest_CY, legend="elastic_Rest_CY", fill_color=None, line_color="green")
A.legend.location = "top_right"
output_file("GFEM_vs_CB_elastic_y.html",**mode="inline"**, title="Wing Station vs Shear Force along y direction")
show(A)
哪裏的代碼,你在呼喚背景虛化?不要忘記包含一個最小完整的可驗證示例:https://stackoverflow.com/help/mcve –