127.0.0.1 - - [14/May/2023 00:58:30] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [14/May/2023 00:58:30] "GET /static/sweetalert/dist/sweetalert.css HTTP/1.1" 404 - 127.0.0.1 - - [14/May/2023 00:58:30] "GET /static/sweetalert/dist/sweetalert.min.js HTTP/1.1" 404 - [2023-05-14 00:58:32,535] ERROR in app: Exception on /login [GET] Traceback (most recent call last): File "F:\python\lib\site-packages\flask\app.py", line 2311, in wsgi_app response = self.full_dispatch_request() File "F:\python\lib\site-packages\flask\app.py", line 1834, in full_dispatch_request rv = self.handle_user_exception(e) File "F:\python\lib\site-packages\flask\app.py", line 1737, in handle_user_exception reraise(exc_type, exc_value, tb) File "F:\python\lib\site-packages\flask\_compat.py", line 36, in reraise raise value File "F:\python\lib\site-packages\flask\app.py", line 1832, in full_dispatch_request rv = self.dispatch_request() File "F:\python\lib\site-packages\flask\app.py", line 1818, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "G:\python\course_select_system-master\app\view.py", line 50, in login return render_template('login.html') File "F:\python\lib\site-packages\flask\templating.py", line 135, in render_template context, ctx.app) File "F:\python\lib\site-packages\flask\templating.py", line 117, in _render rv = template.render(context) File "F:\python\lib\site-packages\jinja2\asyncsupport.py", line 76, in render return original_render(self, *args, **kwargs) File "F:\python\lib\site-packages\jinja2\environment.py", line 1008, in render return self.environment.handle_exception(exc_info, True) File "F:\python\lib\site-packages\jinja2\environment.py", line 780, in handle_exception reraise(exc_type, exc_value, tb) File "F:\python\lib\site-packages\jinja2\_compat.py", line 37, in reraise raise value.with_traceback(tb) File "G:\python\course_select_system-master\app\templates\login.html", line 1, in top-level template code {% extends 'bootstrap/base.html' %} File "F:\python\lib\site-packages\flask_bootstrap\templates\bootstrap\base.html", line 1, in top-level template code {% block doc -%} File "F:\python\lib\site-packages\flask_bootstrap\templates\bootstrap\base.html", line 4, in block "doc" {%- block html %} File "F:\python\lib\site-packages\flask_bootstrap\templates\bootstrap\base.html", line 20, in block "html" {% block body -%} File "F:\python\lib\site-packages\flask_bootstrap\templates\bootstrap\base.html", line 26, in block "body" {% block scripts %} File "F:\python\lib\site-packages\flask_bootstrap\templates\bootstrap\base.html", line 27, in block "scripts" <script src="{{bootstrap_find_resource('jquery.js', cdn='jquery')}}"></script> jinja2.exceptions.UndefinedError: 'bootstrap_find_resource' is undefined 127.0.0.1 - - [14/May/2023 00:58:32] "GET /login HTTP/1.1" 500 -
时间: 2023-06-18 07:05:03 浏览: 127
mysql-8.0.20-macos10.15-x86_64.tar.gz
这看起来是一个 Flask 应用程序的错误日志。从日志中可以看出,应用程序在处理 GET 请求时遇到了错误。具体来说,访问的静态文件没有找到,而且在渲染 login.html 模板时出现了一个未定义的变量 bootstrap_find_resource。这可能是因为在模板中使用了 Flask-Bootstrap 扩展,但是它没有正确安装或配置。你可以检查一下 Flask-Bootstrap 的安装和配置是否正确,或者尝试更换其他的静态文件库。
阅读全文