WordCloud2的output_notebook()有错误

问题描述 投票:0回答:1

我从https://gke.mybinder.org/v2/gh/joranbeasley/bokeh-wordcloud-notebook/master?filepath=bokeh_wordcloud2.ipynb

我点安装word_cloud2并仅运行以查看此错误

Compilation failed:

../../../Anaconda3/lib/site-packages/bokeh_wordcloud2/typescript/extension_bokeh_wordcloud2.ts:351:13 - error TS2741: Property '0' is missing in type '(typeof Number | null)[]' but required in type '[PropertyConstructor<number>, (number | (() => number) | undefined)?]'.

351             gridSize:[p.Number,  null],
                ~~~~~~~~

  ../../../Anaconda3/lib/site-packages/bokeh_wordcloud2/typescript/extension_bokeh_wordcloud2.ts:314:9
    314         gridSize:p.Property<number>
                ~~~~~~~~
    The expected type comes from property 'gridSize' which is declared here on type 'Partial<DefineOf<Props>>'
../../../Anaconda3/lib/site-packages/bokeh_wordcloud2/typescript/extension_bokeh_wordcloud2.ts:352:13 - error TS2741: Property '0' is missing in type '(typeof String | null)[]' but required in type '[PropertyConstructor<string>, (string | (() => string) | undefined)?]'.

352             fontFamily:[p.String,  null],
                ~~~~~~~~~~

  ../../../Anaconda3/lib/site-packages/bokeh_wordcloud2/typescript/extension_bokeh_wordcloud2.ts:315:9
    315         fontFamily:p.Property<string>
                ~~~~~~~~~~
    The expected type comes from property 'fontFamily' which is declared here on type 'Partial<DefineOf<Props>>```
bokeh word-cloud
1个回答
0
投票

自定义扩展代码仍然与该扩展所针对的Bokeh版本紧密相关。该活页夹示例使用1.2版,因此您需要使用该版本及其代码。

© www.soinside.com 2019 - 2024. All rights reserved.