我正在尝试使用TextAreaInput在每次文本更新时自动向下滚动,当我尝试使用CustomJS时,在浏览器生成的脚本中发现以下错误:
Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing
浏览器控制台上的错误:
TypeError: Cannot read property 'connect' of undefined
以及
[bokeh] Failed to repull session TypeError: Cannot read property 'connect' of undefined
尽管我将javascript代码缩减为“nothing”,但还是出现了相同的错误。 下面是代码片段
from bokeh.models.widgets import TextAreaInput
from bokeh.models import CustomJS
class projectdata:
def __init__(self, doc):
self.textarea = TextAreaInput(value="XER file contents will show here!", rows = 10, name="textarea", css_classes=["mytext"])
callback = CustomJS(args=dict(text=self.textarea),code="""""")
self.textarea.js_on_change('scroll', callback)
Python:3.7.3, 波基:1.3.4, 浏览器:Chrome
谢谢
经过试验,我发现错误的原因是“滚动”的行
正确的名称应该是“value”
在那次小小的改变之后,一切正常,但仍然在为TextArea自动滚动工作
第一个错误是告诉你没有https://pypi.org/project/bokeh/
相关问题 更多 >
编程相关推荐