简体   繁体   English

Python Bokeh:内部服务器错误

[英]Python Bokeh: Internal Server Error

I've been trying this simple example of embedding in Bokeh - that is, embedding a simple bokeh-based graph onto a html file. 我一直在尝试在Bokeh中嵌入的这个简单示例-也就是说,将一个简单的基于bokeh的图形嵌入到html文件中。 When I navigate to localhost:5000, it throws up an internal server error webpage on my browser. 当我导航到localhost:5000时,它在浏览器中抛出一个internal server error网页。

Normally, I wouldn't post anything here without some records of what I've tried, but there's nothing to try. 通常,在没有任何尝试记录的情况下,我不会在此处发布任何内容,但是没有尝试可做的事情。 This is the simplest example of embedding, which I'm trying to learn, and it's not working. 这是我尝试学习的最简单的嵌入示例,但无法正常工作。

If i just download that file, and add debug=True to the call to app.run then it shows an actual exception: 如果我只是下载该文件,然后将debug=True添加到对app.run的调用中,那么它将显示一个实际的异常:

jinja2.exceptions.TemplateNotFound: embed.html

If you look in the directory on GitHub you can see there is also a templates directory with the embed.html in it. 如果您在GitHub上的目录中查找,则可以看到还有一个包含embed.htmltemplates目录。 Did you copy the example file without also copying the accompanying (and necessary) templates directory? 您是否在复制示例文件的同时未复制随附的(和必要的) templates目录?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM