CS50 Ide 烧瓶缓慢且错误
CS50 Ide flask slow and errors
我已经完成了我的最终项目,一个游戏网站之类的东西,我用 flask 做的。我大约 2 个月前完成了这个项目,直到现在我才提交它,但是当我开始制作 video 时,我意识到我的网站非常慢。 (我一直在使用 cs50 ide)并且特定页面无法加载,而其他页面则需要很长时间,所以我删除了“flask_sessions”中的所有文件如果我删除它们,会话不会影响整个程序。它有效,但我无法进入我以前无法进入的页面。我在 运行 我的烧瓶应用程序的终端中遇到了这些错误。
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/FP/flask_session/a64629a7c4037bc0e4fc3f1900f2250a'
INFO: 192.168.40.114 - - [15/Aug/2021 08:45:34] "GET /home HTTP/1.0" 302 -
INFO: 192.168.40.114 - - [15/Aug/2021 08:45:36] "GET /login HTTP/1.0" 200 -
WARNING: Exception raised while handling cache file '/home/ubuntu/FP/flask_session/a64629a7c4037bc0e4fc3f1900f2250a'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/FP/flask_session/a64629a7c4037bc0e4fc3f1900f2250a'
感谢任何帮助,谢谢!
** 21 年 8 月 18 日更新:今天再次 运行 我的代码,我不再收到警告错误。我还意识到我的代码中有一个错误导致链接无法正常工作!可能值得重新 运行 调整您的代码并查看警告消息是否也适用于您。**
*我仍然在掌握一些东西(因此在 CS50 课程上!)如果这不是那么有用,我深表歉意。但我也有一个非常相似的问题——我在大约一个月的休息后回来拍摄我的最终项目视频,现在无法访问我网站的一半,因为我的商店页面上的链接不再加载页面。我收到了一条与你自己类似的错误消息:
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
INFO: 192.168.24.92 - - [17/Aug/2021 19:58:30] "GET / HTTP/1.0" 200 -
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
INFO: 192.168.24.92 - - [17/Aug/2021 19:58:31] "GET /static/styleshomepage.css HTTP/1.0" 200 -
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
INFO: 192.168.18.228 - - [17/Aug/2021 19:58:31] "GET /static/jskname.png HTTP/1.0" 200 -
INFO: 192.168.24.92 - - [17/Aug/2021 19:58:31] "GET /static/loading.js HTTP/1.0" 200 -
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
我注意到 Python 的新版本(Python 3.9.6)最近被安装到 IDE,想知道这是否会导致某处链中断为了我们?但我似乎无法在 google 上找到这方面的迹象。认为值得分享的是您的问题可能不是孤立的。我会继续谷歌搜索,如果你碰巧弄明白了,我会很感激你的决定!
杰斯*
我已经完成了我的最终项目,一个游戏网站之类的东西,我用 flask 做的。我大约 2 个月前完成了这个项目,直到现在我才提交它,但是当我开始制作 video 时,我意识到我的网站非常慢。 (我一直在使用 cs50 ide)并且特定页面无法加载,而其他页面则需要很长时间,所以我删除了“flask_sessions”中的所有文件如果我删除它们,会话不会影响整个程序。它有效,但我无法进入我以前无法进入的页面。我在 运行 我的烧瓶应用程序的终端中遇到了这些错误。
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/FP/flask_session/a64629a7c4037bc0e4fc3f1900f2250a'
INFO: 192.168.40.114 - - [15/Aug/2021 08:45:34] "GET /home HTTP/1.0" 302 -
INFO: 192.168.40.114 - - [15/Aug/2021 08:45:36] "GET /login HTTP/1.0" 200 -
WARNING: Exception raised while handling cache file '/home/ubuntu/FP/flask_session/a64629a7c4037bc0e4fc3f1900f2250a'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/FP/flask_session/a64629a7c4037bc0e4fc3f1900f2250a'
感谢任何帮助,谢谢!
** 21 年 8 月 18 日更新:今天再次 运行 我的代码,我不再收到警告错误。我还意识到我的代码中有一个错误导致链接无法正常工作!可能值得重新 运行 调整您的代码并查看警告消息是否也适用于您。**
*我仍然在掌握一些东西(因此在 CS50 课程上!)如果这不是那么有用,我深表歉意。但我也有一个非常相似的问题——我在大约一个月的休息后回来拍摄我的最终项目视频,现在无法访问我网站的一半,因为我的商店页面上的链接不再加载页面。我收到了一条与你自己类似的错误消息:
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
INFO: 192.168.24.92 - - [17/Aug/2021 19:58:30] "GET / HTTP/1.0" 200 -
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
INFO: 192.168.24.92 - - [17/Aug/2021 19:58:31] "GET /static/styleshomepage.css HTTP/1.0" 200 -
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
INFO: 192.168.18.228 - - [17/Aug/2021 19:58:31] "GET /static/jskname.png HTTP/1.0" 200 -
INFO: 192.168.24.92 - - [17/Aug/2021 19:58:31] "GET /static/loading.js HTTP/1.0" 200 -
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
WARNING: Exception raised while handling cache file '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/cachelib/file.py", line 162, in get
with open(filename, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpuv7wov85/ca6dfca1fdaa25788a7a7ca23608f8c2'
我注意到 Python 的新版本(Python 3.9.6)最近被安装到 IDE,想知道这是否会导致某处链中断为了我们?但我似乎无法在 google 上找到这方面的迹象。认为值得分享的是您的问题可能不是孤立的。我会继续谷歌搜索,如果你碰巧弄明白了,我会很感激你的决定! 杰斯*