昨天还能正常预览的报告,今天就访问异常了,打开console一看,bootstrap失效了,晕~
![](https://img.haomeiwen.com/i13136383/a7151481cd1e35a5.png)
解决办法:在template.html文件中替换掉失效的文件链接
具体操作:在【Python安装目录】\Lib\site-packages\BeautifulReport\template目录下,找到这个文件
![](https://img.haomeiwen.com/i13136383/77ebe53dcf9eda5b.png)
替换
<link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
![](https://img.haomeiwen.com/i13136383/be8644ea263c3c0f.png)
![](https://img.haomeiwen.com/i13136383/554eb648bf15fcab.png)
![](https://img.haomeiwen.com/i13136383/99b96a16e006817a.png)
参考文章:https://blog.csdn.net/qq_43278421/article/details/106516409
网友评论